Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / November 2005

Tip: Looking for answers? Try searching our database.

Emailing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrew Robinson - 21 Nov 2005 22:20 GMT
I am working on a project for my employer that will allow users to opt-in
for a weekly email news letter. This is a company that has a high regard for
their public image and I would consider this to be very legitimate. They are
talking about sending a few thousand to possibly 10,000 emails every week.
Numbers could go even higher. They have the hardware and bandwidth capacity
to handle this. The issue is the software design.

At a high level and using .NET, what is the best way to handle
non-deliveries and bounced email? Can I do this with
System.Net.Mail.SmtpFailedRecipientException?
System.Net.Mail.SmtpStatusCode? Should I be sending this using the async
features in System.Net.Mail? How?

Anything else I should be looking at? Any pointers or info beyond basic
emailing with System.Net.Mail would be really helpful.

Thanks,

-Andrew
"Jeffrey Tan[MSFT]" - 22 Nov 2005 07:53 GMT
Hi Andrew,

Based on my understanding, you have the scenario of sending a lot of emails
with .Net2.0, you want to get some information of how do this efficiently.

Yes, I agree that it is better for us to do asynchronized smtp emailing for
lots of emails sending. Then the system will spawn a background thread from
Thread pool for us to do the actual sending work. And our UI/main thread
will not be blocked from the code and continue to issue another email
sending work.

In .Net2.0, we can use SmtpClient.SendAsync() method to issue the
asynchronize emailing. Before calling this method, we should first register
the callback function with SmtpClient.SendCompleted event. And in the
callback event handler, we can access the exception or error in
AsyncCompletedEventArgs.Error property.

The link below talks about using .Net2.0 send emails:
"Send Mails from within a .NET 2.0 Application"
http://developer.com/net/net/article.php/11087_3511731_2

Hope this helps

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Andrew Robinson - 22 Nov 2005 17:26 GMT
Jeffrey,

Thanks for the reply. Any info on the following would be really helpful:

"At a high level and using .NET, what is the best way to handle
non-deliveries and bounced email? Can I do this with
System.Net.Mail.SmtpFailedRecipientException?
System.Net.Mail.SmtpStatusCode?"

Good article that you pointed me to.

Thanks!

> Hi Andrew,
>
[quoted text clipped - 28 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
"Jeffrey Tan[MSFT]" - 23 Nov 2005 10:21 GMT
Hi Andrew,

I can not find any article talks about SmtpFailedRecipientException and
SmtpStatusCode. I am not sure of what information about these classes you
want, I think we can use look up its members in MSDN, then use its members
to get extra information of the current smtp status or exceptions, it
should not be much difficulties.

If you have any additional concern or obstacles, please feel free to tell
me, thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.