/// <summary> /// Send an email to the specified recipient group containing details of the issues in this list. /// </summary> /// <param name="recipientGroup">The name of the recipient group as defined in your program's Recipients.xml file.</param> /// <param name="log">Log file to attach with further details.</param> /// <param name="attachmentFilepaths">Any additional files to attach.</param> /// <param name="useOpeners">If true, the body of the email will be preceded by comedic openers.</param> public void Send(string recipientGroup, bool useOpeners = true, Log log = null, IEnumerable <string> attachmentFilepaths = null) { RecipientList group = RecipientList.Get(recipientGroup); if (group == null) { throw new ArgumentException("\"" + recipientGroup + "\" is not a valid recipient group."); } Send(group, log ?? Log, useOpeners, attachmentFilepaths); }
/// <summary> /// Send an email to a specified email group. /// </summary> /// <param name="from">The email address from which the email is sent.</param> /// <param name="groupName">The email group to which the email will be sent, as defined in your program's Recipients.xml file.</param> /// <param name="subject">The text to go in the subject line of the email.</param> /// <param name="message">The text to go in the body of the email.</param> /// <param name="log">The Log file to send.</param> /// <param name="useOpeners">If true, the email body will be preceded by comedic openers.</param> /// <param name="attachmentFilepaths">An array containing the filepaths of the attachments.</param> /// <param name="isHtml">If true, the email will be sent as HTML, else plain text.</param> public static void SendEmail(string from, string groupName, string subject, string message, Log log = null, bool useOpeners = false, IEnumerable <string> attachmentFilepaths = null, bool isHtml = false) { SendEmail(from, RecipientList.Get(groupName), subject, message, log, useOpeners, attachmentFilepaths, isHtml); }