I am using vs 2005. I have a form that has a list of 15 checkboxes that have emails attached to them. I can post more code but I have some of it right here:
'This is everyone
Dim techs As String
techs = "email1@server.org;"
ToAddress.AppendText(techs)
'Tech1 you get the idea!
Dim tech1 As String
tech1 = "email2@server.org;"
ToAddress.AppendText(tech1)
Dim tech2 As String
tech2 = "email@server.com;"
ToAddress.AppendText(tech2)
It rights the text in there but it doesn't accept either format...
email1.server.org; email2@server.org;
email1.server.org;email2@server.org;
If I do either it gives me an exception error but if I only have one email address it's ok. FYI - I can't even have the semi-colon after the e-mail address or it will throw an exception error.
here is the error when debugging:
The specified string is not in the form required for an e-mail address. FormatException was unhandled.
Dim <begin highlighted error>mailmsg As new MailMessage(From.Text.Trim, ToAddress.Text.Trim)<end highlighted error>
Any help or ideas that I am easily overlooking would be great. Thank you.
'This is everyone
Dim techs As String
techs = "email1@server.org;"
ToAddress.AppendText(techs)
'Tech1 you get the idea!
Dim tech1 As String
tech1 = "email2@server.org;"
ToAddress.AppendText(tech1)
Dim tech2 As String
tech2 = "email@server.com;"
ToAddress.AppendText(tech2)
It rights the text in there but it doesn't accept either format...
email1.server.org; email2@server.org;
email1.server.org;email2@server.org;
If I do either it gives me an exception error but if I only have one email address it's ok. FYI - I can't even have the semi-colon after the e-mail address or it will throw an exception error.
here is the error when debugging:
The specified string is not in the form required for an e-mail address. FormatException was unhandled.
Dim <begin highlighted error>mailmsg As new MailMessage(From.Text.Trim, ToAddress.Text.Trim)<end highlighted error>
Any help or ideas that I am easily overlooking would be great. Thank you.