c# - sendAsync() does not send mail always in asp.net -


I can not send asynchronous mail using C # in ASP.NET. Although my code is correct, if I try to send mail 10 times is successful only 1 time, the rest of 9 times is not an error message, but the mail is also not sent to its destination. I am sending data to mail attachments. I want to send a file of up to 5 MB size.

Any kind of help would be appreciated.

The probability that all your threads are trying to read the same file at the same time, Therefore, 9 of them fail and only one is successful (1 who picked it first and lock it).

Make sure you open the file as read only for attachments, or add threading permits that wait for other threads to be free for the file.


Comments