M
Marcus Michaels
Hi folks,
I am recently experiencing an issue, where correctly formatted email
addresses can not be passed to the MailAddress constructor.
I use a string variable to assign he address and the code breaks with a
FormatException thrown.
I saw other posts referring to issues in the web.config, but I have no issues.
Most addresses are fine, but the ones throwing an exception can be added as
text directly and worj fine.
A sample
dim e as string
e="(e-mail address removed)"
Dim objMail As MailMessage = New MailMessage
objMail.To.Add(e)
the statemet above fires the error.
Dim objMail As MailMessage = New MailMessage
objMail.To.Add("(e-mail address removed)")
works perfectly though.
Any hints???
Marcus
I am recently experiencing an issue, where correctly formatted email
addresses can not be passed to the MailAddress constructor.
I use a string variable to assign he address and the code breaks with a
FormatException thrown.
I saw other posts referring to issues in the web.config, but I have no issues.
Most addresses are fine, but the ones throwing an exception can be added as
text directly and worj fine.
A sample
dim e as string
e="(e-mail address removed)"
Dim objMail As MailMessage = New MailMessage
objMail.To.Add(e)
the statemet above fires the error.
Dim objMail As MailMessage = New MailMessage
objMail.To.Add("(e-mail address removed)")
works perfectly though.
Any hints???
Marcus