public static void SendMailsToQueue(Email[] emails, string queuePath) { if (emails.Count() != 0) { var EmailQueue = new MessageQueueSender(queuePath); foreach (Email email in emails) { EmailQueue.SendMessage(email); } } }
public static void SendMailToQueue(Email email, string queuePath) { if (email != null) { var EmailQueue = new MessageQueueSender(queuePath); EmailQueue.SendMessage(email); } }