Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ SendToCollectionCompleted()

static void System.Net.Mail.SendMailAsyncResult.SendToCollectionCompleted ( IAsyncResult result)
inlinestaticprivate

Definition at line 102 of file SendMailAsyncResult.cs.

103 {
104 if (result.CompletedSynchronously)
105 {
106 return;
107 }
109 try
110 {
111 if (!RecipientCommand.EndSend(result, out var response))
112 {
113 sendMailAsyncResult._failedRecipientExceptions.Add(new SmtpFailedRecipientException(sendMailAsyncResult._connection.Reader.StatusCode, sendMailAsyncResult._toCollection[sendMailAsyncResult._toIndex - 1].GetSmtpAddress(sendMailAsyncResult._allowUnicode), response));
114 if (sendMailAsyncResult._failedRecipientExceptions.Count == sendMailAsyncResult._toCollection.Count)
115 {
116 SmtpFailedRecipientException ex = ((sendMailAsyncResult._toCollection.Count == 1) ? sendMailAsyncResult._failedRecipientExceptions[0] : new SmtpFailedRecipientsException(sendMailAsyncResult._failedRecipientExceptions, allFailed: true));
117 ex.fatal = true;
118 sendMailAsyncResult.InvokeCallback(ex);
119 return;
120 }
121 }
122 sendMailAsyncResult.SendToCollection();
123 }
124 catch (Exception result2)
125 {
126 sendMailAsyncResult.InvokeCallback(result2);
127 }
128 }
void Add(TKey key, TValue value)
SendMailAsyncResult(SmtpConnection connection, MailAddress from, MailAddressCollection toCollection, bool allowUnicode, string deliveryNotify, AsyncCallback callback, object state)
readonly List< SmtpFailedRecipientException > _failedRecipientExceptions

References System.Net.Mail.SendMailAsyncResult.SendMailAsyncResult(), System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.IAsyncResult.AsyncState, System.IAsyncResult.CompletedSynchronously, System.Collections.Generic.Dictionary< TKey, TValue >.Count, and System.Net.Mail.RecipientCommand.EndSend().