views:

23

answers:

1

Hi All,

I am using asp.net 3.5 and C#.

I have a blog site and I want that whenever user enter any comment, the suscriber related to that post will get the notification. So what I am doing that I am sending mail at the same time as the comment is inserted into the table, which sometimes take time because of the quantity of user. Is their any way that user enter the comment into the database and the send mail function will run asynchornysly which will not interfear user to go ahead with his task. please let me know how to acheieve it in a simplier way.

Thanks in advance

A: 

You can use the SendAsync method on the SmtpClient. It will not block the calling thread.

tvanfosson