For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > May 2007 > Sending Email with System.Net.Mail









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Sending Email with System.Net.Mail
Philip

2007-05-30, 7:10 pm

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 john.doe@yahoo.com, 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 jdoe@yahoo.com...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

--
Philip
David Wier

2007-05-30, 7:10 pm

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

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://iWritePro.com



"Philip" <philip@softwareforever.com> wrote in message
news:0E2BC514-3C9A-4ED5-B8AC-D0D1ABE25CAC@microsoft.com...
>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 john.doe@yahoo.com, 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 jdoe@yahoo.com...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
>
> --
> Philip



Mark Rae

2007-05-30, 7:10 pm

"Philip" <philip@softwareforever.com> wrote in message
news:0E2BC514-3C9A-4ED5-B8AC-D0D1ABE25CAC@microsoft.com...

>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 john.doe@yahoo.com, 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 jdoe@yahoo.com...everything works fine.


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


--
http://www.markrae.net

Juan T. Llibre

2007-05-30, 7:10 pm

The MailMessage format changed a bit :

Dim FromAddress As String = "someone@somewhere.com"
Dim ToAddress As String = "someone.else@somewhereelse.com"
Dim mail As New MailMessage(FromAddress, ToAddress)



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Philip" <philip@softwareforever.com> wrote in message
news:0E2BC514-3C9A-4ED5-B8AC-D0D1ABE25CAC@microsoft.com...
>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 john.doe@yahoo.com, 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 jdoe@yahoo.com...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
>
> --
> Philip



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com