We have problem today with our mail server. Their SMTP server went down. The only time in years we have had that problem. However it brought our server to it's knees. The majority of the errors that were recorded is like the one below. A sample of our code is below that.
I realize it was a provider failure, but is there a best practices type of approach to keep their failure from becoming ours, by sending to an alternative SMTP server, queuing for later or even dropping them without the server lag would be preferable.
Thanks
Randy Miller
Aspose.Email.Mail.SmtpException: Failure sending mail. ---> System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
We are sorry to share that there is no other method available that can help in this regard. The SmtpClient of the API doesn’t have any such method to identify if the server is available or not. Please let us know if we could be of any additional help to you in this regard.
Is there an easy way to buffer the emails on my server and then have the buffer send it to SMTP server?
I don’t really consider it a problem with your software, but was just hoping that since you know a lot more about email sending than I do, you might know about a best practice that would help.
We are afraid to share that no such method is available to determine if the SMTP server is available or not. However, you can use some methods available online such as sending an EHLO command to the SMTP server. This article may also be of help to you.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.