tag:blogger.com,1999:blog-4128767709785759609.post430887223972720287..comments2023-05-17T08:54:42.809-07:00Comments on w3ka dev - share the knowledge .NET: ASP.NET C# How to send mail with SMTP Authetication.Plamen Kasabovhttp://www.blogger.com/profile/01894448905932275574noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-4128767709785759609.post-45152945613281024572013-01-01T12:29:07.718-08:002013-01-01T12:29:07.718-08:00I basically agree.
The advantage of the way above...I basically agree. <br />The advantage of the way above is the on time error handling. If the regular case includes only one recipient the delay should be pretty low. <br />Having these facts in place the developer has to carefully consider the best way to handle that.Plamen Kasabovhttps://www.blogger.com/profile/01894448905932275574noreply@blogger.comtag:blogger.com,1999:blog-4128767709785759609.post-43503106921579775682012-12-31T23:00:17.632-08:002012-12-31T23:00:17.632-08:00Problem with that code is, it will wait until the ...<br />Problem with that code is, it will wait until the receiver's sever will pick up the mail when your server is calling - since this may take 2 - 3 seconds your app seems to hang, if its a desktop app; if its a webapp, your page rendering/loading will seem to hang.<br />Only solution is to make this an asynchron task:<br />Either by sending the mail in a background thread (by encapsulating the smtp-mail-setup stuff in a class), or use some of the fancy MVC features to accomplish it.<br />RegardsLelalahttp://www.lelala.denoreply@blogger.com