Sending Email with System.Net.Mail

G

Guest

I switched from System.Web.Mail to System.Net.Mail, however I am now
reconsidering that move because if I send an email to an email address in the
form (e-mail address removed), I receive an error message "The specified string is
not in the form required for an e-mail address". I have conducted further
testing and evidently the SmtpClient class Send method does not like the
period "." between the "john" and "doe". If I conduct a test with an email
address in the form (e-mail address removed)...everything works fine.

This is a showstopper for me... if I am using System.Net.Mail to inform
e-commerce customers of post-purchase activity. I can never predict when I
may encounter a non-conforming email address.

Does anyone know whether a fix is available to System.Net.Mail ???

Philip
 
D

David Wier

What is your syntax for providing the email address?
It's not the same syntax as it was in the older version
 
M

Mark Rae

I switched from System.Web.Mail to System.Net.Mail, however I am now
reconsidering that move because if I send an email to an email address in
the
form (e-mail address removed), I receive an error message "The specified string
is
not in the form required for an e-mail address". I have conducted further
testing and evidently the SmtpClient class Send method does not like the
period "." between the "john" and "doe". If I conduct a test with an
email
address in the form (e-mail address removed)...everything works fine.

Hmm - please provide the code you are using...
 
J

Juan T. Llibre

The MailMessage format changed a bit :

Dim FromAddress As String = "(e-mail address removed)"
Dim ToAddress As String = "(e-mail address removed)"
Dim mail As New MailMessage(FromAddress, ToAddress)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top