/// <summary>
 /// Sends a batch of up to messages through the Postmark API.
 /// All email addresses must be valid, and the sender must be
 /// a valid sender signature according to Postmark. To obtain a valid
 /// sender signature, log in to Postmark and navigate to:
 /// http://postmarkapp.com/signatures.
 /// </summary>
 /// <param name="messages">A prepared message batch.</param>
 /// <returns></returns>
 public static async Task <IEnumerable <PostmarkResponse> > SendMessagesAsync(this PostmarkClient client, IEnumerable <PostmarkMessage> messages)
 {
     return(await client.SendMessagesAsync(messages.ToArray()));
 }
예제 #2
0
 /// <summary>
 /// Send a System.Net.MailMessage(s) (transparently converts to the PostmarkMessages).
 /// </summary>
 /// <param name="client"></param>
 /// <param name="messages"></param>
 /// <returns></returns>
 public static async Task <IEnumerable <PostmarkResponse> > SendMessagesAsync
     (this PostmarkClient client, params MailMessage[] messages)
 {
     return(await client.SendMessagesAsync(messages.Select(ConvertSystemMailMessage)));
 }