コード例 #1
0
 private void SendArrivalEmail(string email, string user, DateTime arrivalTime)
 {
     GMailEmailSender.SendEmail(new GmailSendEmailParameters()
     {
         From            = ConfigHelper.Config.SMTP.From,
         FromDisplayName = ConfigHelper.Config.SMTP.FromDisplayName,
         Subject         = "Arrival time updated",
         To   = email,
         Body = EmailTemplateManager.CreateArrivalEmailBody(new ArrivalEmailParameters()
         {
             User = user,
             Time = ParseTime(arrivalTime)
         })
     });
 }
コード例 #2
0
 private void SendActivationEmail(string email, string user, string activationLink)
 {
     try
     {
         GMailEmailSender.SendEmail(new GmailSendEmailParameters()
         {
             From            = ConfigHelper.Config.SMTP.From,
             FromDisplayName = ConfigHelper.Config.SMTP.FromDisplayName,
             Subject         = "Welcome to Happy Hours!",
             To   = email,
             Body = EmailTemplateManager.CreateActivationEmailBody(new ActivationEmailParameters()
             {
                 User           = user,
                 ActivationLink = activationLink
             })
         });
     }
     catch (Exception ex) { }
 }