My contact page uses an update panel and the System.Net.Mail namespace to send a message. It seems to work fine.
I read about starting a new thread for the email capability. I think the rational was to not tie up the application thread if there's an issue with the email. It was an interesting idea.
Does anyone recommend, or not recommend, starting a new thread for an email being sent from a site?
Gaining competency by discovering my incompetencies.
I think this also takes into account the number of e-mails that need to be sent. For e-mailing a couple of people, I've never started another thread. Of course, in any case, you'll need to foresee the necessary exception handling.
Dimitri C.
Marked as answer by newbie2C# on Mar 03, 2012 11:32 PM
like said, if you just want to send an email to a couple of people you shouldn't start a new thread. If you want to send some more emails I would recommend to do that with a windows service if you can.
Regards.
If my post solves your problem, please mark as answer.
Marked as answer by newbie2C# on Mar 03, 2012 11:32 PM
newbie2C#
Member
694 Points
1179 Posts
start new thread for email?
Feb 29, 2012 01:03 AM|LINK
My contact page uses an update panel and the System.Net.Mail namespace to send a message. It seems to work fine.
I read about starting a new thread for the email capability. I think the rational was to not tie up the application thread if there's an issue with the email. It was an interesting idea.
Does anyone recommend, or not recommend, starting a new thread for an email being sent from a site?
gamblor
Member
82 Points
15 Posts
Re: start new thread for email?
Feb 29, 2012 07:03 AM|LINK
I think this also takes into account the number of e-mails that need to be sent. For e-mailing a couple of people, I've never started another thread. Of course, in any case, you'll need to foresee the necessary exception handling.
newbie2C#
Member
694 Points
1179 Posts
Re: start new thread for email?
Mar 03, 2012 06:08 PM|LINK
I think your correct. The new thread was used to email a list of people for a news letter. A new thread makes sense in this type of situation.
I probably won't wory about it for my contact page since only one email will be submitted at a time.
Horizon_Net
Star
8277 Points
1435 Posts
Re: start new thread for email?
Mar 03, 2012 08:15 PM|LINK
Hi,
like said, if you just want to send an email to a couple of people you shouldn't start a new thread. If you want to send some more emails I would recommend to do that with a windows service if you can.
If my post solves your problem, please mark as answer.