[Mono-list] MailMessage Recipients Exceptions
Damien DALY
maitredede at gmail.com
Mon Mar 17 15:32:07 EDT 2008
Can you trace the smtp connection, using spy tool like ethereal ?
2008/3/17, Steve Harp <steve at abelscreening.com>:
>
> Hi Damien,
>
>
>
> The error log was created using a read ISP account and real email
> addresses. And no, there is no InnerException.
>
>
>
> Steve Harp
>
> Abel Screening, Inc.
>
>
>
> *From:* mono-list-bounces at lists.ximian.com [mailto:
> mono-list-bounces at lists.ximian.com] *On Behalf Of *Damien DALY
> *Sent:* Monday, March 17, 2008 2:50 PM
> *To:* Mono-list at lists.ximian.com
> *Subject:* Re: [Mono-list] MailMessage Recipients Exceptions
>
>
>
> Hi Steve,
>
> - Have you tried with real mail address and credentials using existing
> servers ?
> - Is there an InnerException ?
>
> Damien
>
> 2008/3/17, Steve Harp <steve at abelscreening.com>:
>
> Hi All,
>
> I'm new to the list so please excuse me if this has already been covered.
> I'm having trouble sending email. The code below works under .NET but not
> under Mono. The exception thrown seems to be with the way I'm specifying
> my
> recipients.
>
> private void SendTest()
> {
> try
> {
> MailMessage mail = new MailMessage();
>
> mail.From = new MailAddress("me at mydomain.com");
> mail.To.Add("you at yourdomain.com");
>
> mail.Subject = "This is a test";
> mail.Body = "This is a test\r\nThis is only a test.";
>
> SmtpClient smtp = new SmtpClient("smtp.myisp.net", 587);
>
> smtp.Credentials = new NetworkCredential("me at mydomain.com
> ",
> "mypassword");
> smtp.Send(mail);
> }
> catch (Exception ex)
> {
> Log("Error Sending Email", ex);
> }
> }
>
> /*
> =========================================
> Here's the log file...
>
> 3/17/2008 1:14:47 PM
> Error Sending Email
> System.Net.Mail.SmtpFailedRecipientsException: failed recipients
> at System.Net.Mail.SmtpClient.SendCore (System.Net.Mail.MailMessage
> message) [0x0048c] in
> /tmp/monobuild/build/BUILD/mono-1.9
> /mcs/class/System/System.Net.Mail/SmtpCli
> ent.cs:595
> at System.Net.Mail.SmtpClient.Send (System.Net.Mail.MailMessage message)
> [0x00052] in
> /tmp/monobuild/build/BUILD/mono-1.9
> /mcs/class/System/System.Net.Mail/SmtpCli
> ent.cs:446
> at MainWindow.SendTest () [0x00061] in MainWindow.cs:64
>
> =========================================
> */
>
>
> Thanks for any suggestions,
> Steve
>
>
>
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20080317/d0b3a4c6/attachment.html
More information about the Mono-list
mailing list