コード例 #1
0
 /// <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);
 }
コード例 #2
0
 /// <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));
 }