Home Dashboard Directory Help
Search

Failure sending mail by Dan1


Status: 

Closed
 as By Design Help for as By Design


1
0
Sign in
to vote
Type: Bug
ID: 548727
Opened: 4/5/2010 3:42:59 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

A program written in VB 2007 was sending SUCCESSFULLY e-mails to users, over a Virtual SMTP Server in IIS 6.
After converting the program to Visual Studio 2010 RC, it throws the exception
"A first chance exception of type 'System.Net.Mail.SmtpException' occurred in System.dll
>>>SendMail/Exception: Failure sending mail.
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at EmailNotif.Form2.SendEmail(String strFileName) in E:\IRIS\VS-NET-Production\EmailNotif\EmailNotif\Form2.vb:line 226"
I am not aware of any changes with the exception of VS 2010 and Microsoft Updates
Details
Sign in to post a comment.
Posted by Dan1 on 6/26/2010 at 9:11 AM
Thank you very much for your comments.
The program was working as expected before installing VS2010. No doubt.
We gave up, waiting for a hint from Microsoft.
Then after a while, when we tried again, magic! It works again, possibly after installing an update.
Thanks again.
Best regards,
Dan
Posted by Microsoft on 6/26/2010 at 8:28 AM
Dan, I have checked the sample code you uploaded and found that you were inappropriately re-using disposed MailMessage objects. Checking the Exception.InnerException field explains this. No disposed objects in .NET should be reused.

Your code sample did not appear to work in prior versions either. If you believe the upgrade to VS 2010 broke the project, please upload a copy of the original project so we can reproduce the upgrade process.
Posted by Dan1 on 4/23/2010 at 4:53 AM
After installing VS 2010 Release the exception message became
>>>SendMail/Exception: Unable to send to all recipients.
at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception)
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at EmailNotif.Form2.SendEmail(String strFileName) in E:\IRIS\VS-NET-Production\EmailNotif\EmailNotif\Form2.vb:line 226
Posted by Microsoft on 4/18/2010 at 8:25 PM

Thanks for your feedback.

We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution.
These specialized experts will follow-up with your issue.
Posted by Dan1 on 4/15/2010 at 7:05 AM
I just submitted, for the third time, the source file.
Posted by Microsoft on 4/12/2010 at 11:49 PM
Hi, given that we have not heard back from you, we will go ahead and close this Connect Issue. If you get a chance to review and provide the information requested earlier, you can go ahead and reactivate this issue.(Click “Edit this item” button on the site and change the “Status” to “Active”)
Posted by Microsoft on 4/6/2010 at 1:24 AM
Thanks for reporting the issue.
In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.

Could you please attach a zipped project file to this feedback through our site to help us reproduce the issue?

Thanks again for your efforts and we look forward to hearing from you.
Visual Studio Product Team
Posted by PJ on Development on 4/5/2010 at 7:22 AM
It would be nice to add a snippet of the code that's causing the problem.

This way, people could tell you if this is a bug with VS2010 or a faulty code.
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
EmailNotif.zip 4/6/2010 684 KB
EmailNotif.zip 4/15/2010 684 KB
EmailNotif.zip 4/17/2010 684 KB
EmailNotif.zip 4/17/2010 684 KB