Hi all,
I created a windows service windows server 2008 R2.
This service picks up from a db block email, about 8000,
and via asynchronous process sends an email to everyone.
The for loop for each mail is processed by the server in a few seconds,
but in reality the emails are starting in the queue do not know.
How do I know when the service has completed sending the mail actually 8000?
After calling SendAsync, you must wait for the e-mail transmission to complete before attempting to send another e-mail message using
Send or
SendAsync.
You need to create queue yourself, put items in that, on getting async callback, mark queue item status and process next.
Somnath Mali
.NET Developer , Pune INDIA.
Please Mark As Answer If my reply helped you.
dupin
Member
219 Points
203 Posts
send mail asyncr
May 07, 2012 07:03 AM|LINK
Hi all,
I created a windows service windows server 2008 R2.
This service picks up from a db block email, about 8000,
and via asynchronous process sends an email to everyone.
The for loop for each mail is processed by the server in a few seconds,
but in reality the emails are starting in the queue do not know.
How do I know when the service has completed sending the mail actually 8000?
Thanks to all
somnathmali
Contributor
2816 Points
450 Posts
Re: send mail asyncr
May 07, 2012 07:15 AM|LINK
http://msdn.microsoft.com/en-us/library/x5x13z6h.aspx
AS per documentaion
After calling SendAsync, you must wait for the e-mail transmission to complete before attempting to send another e-mail message using Send or SendAsync.
You need to create queue yourself, put items in that, on getting async callback, mark queue item status and process next.
.NET Developer , Pune INDIA.
Please Mark As Answer If my reply helped you.
vijay_myl
Contributor
5070 Points
1068 Posts
Re: send mail asyncr
May 07, 2012 08:13 AM|LINK
hi.
For checking email send succesfully in asyncronous mode you need to create an event handler to check the code......
For more refer the link..
http://www.dotnetjalps.com/2010/02/how-to-send-mail-asynchronously-in.html
My .NET blog
Submit Article