shawnmclean / Mandrill-dotnet

.NET wrapper for Mandrill
Other
202 stars 107 forks source link

SSL/TLS errors when sending email. #109

Open gregotte opened 9 years ago

gregotte commented 9 years ago

About 10% of the time we send an email it fails with the error below. I ended up implementing retry functionality as a work around, but it would be nice to know what causes this to happen.

System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel. at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context) at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult) at RestSharp.Http.RequestStreamCallback(IAsyncResult result, Action1 callback) --- End of inner exception stack trace --- at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at Mandrill.MandrillApi.ba2(Task1 p) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of inner exception stack trace --- at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at SMI.APICommon.MandrillEmailFactory.GetTemplateInfo(String name) at SMI.APICommon.MandrillEmailFactory.Send(MandrillSendMessagePayload payload) ---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel. at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context) at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult) at RestSharp.Http.RequestStreamCallback(IAsyncResult result, Action1 callback) --- End of inner exception stack trace --- at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at Mandrill.MandrillApi.ba2(Task1 p) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.Tasks.Task.Execute() ---> (Inner Exception #0) System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel. at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context) at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult) at RestSharp.Http.RequestStreamCallback(IAsyncResult result, Action`1 callback)<--- <---

rishikapadia1 commented 6 years ago

It's happening for me as well and I also implemented retry logic, but it would be great if we know why a request is failing, Any luck @gregotte?