/// <summary> /// Static method which sends an email synchronously. /// It uses the hardcoded email address. /// </summary> /// <returns>true if successful, false if an error occurred.</returns> public static bool quickSend(String toEmailAddress, String fromEmailAddress, String fromDisplayName, String subject, String body) { try { Gmailer gmailer = new Gmailer(); System.Net.Mail.MailMessage mailMsg = gmailer.createMailMessage(toEmailAddress, fromEmailAddress, fromDisplayName, subject, body); gmailer.send(mailMsg); } catch (Exception ex) { return(false); } return(true); }
/// <summary> /// Static method which sends an email synchronously. /// It uses a hardcoded from email. /// </summary> /// <returns></returns> public static bool quickSend(String toEmailAddress, String subject, String body) { return(Gmailer.quickSend(toEmailAddress, mDefaultFromAddress, mDefaultFromDisplayName, subject, body)); }