private void SendInvitation(string email, string body) { try { SendGridEmailer.Send("*****@*****.**", new List <string> { email }, "You've been invited to Movid HEP", body, null, null, false); } catch (CookieException) { } }
private void SendResetEmail(string email, string url) { try { var subject = "Reset your app.movidhep Password"; var body = new StringBuilder(); body.AppendFormat("<html><p>Hi {0}</p>", email); body.Append("<p>Use the following link to reset your password:</p>"); body.AppendFormat("<p><a href='{0}'> {0} </a></p></html>", url); SendGridEmailer.Send("*****@*****.**", new List <string> { email }, subject, body.ToString(), null, null, false); } catch (CookieException) { } }
private void CompanyNewUserNotification(string email) { try { var subject = string.Format("{0} just signed up for a trial!", email); var toEmails = new List <string>() { "*****@*****.**", "*****@*****.**", "*****@*****.**" }; var body = new StringBuilder(); body.Append("<html><p>Wahoo!</p>"); body.AppendFormat("<p>{0}</p></html>", subject); SendGridEmailer.Send("*****@*****.**", toEmails, subject, body.ToString(), null, null, false); } catch (CookieException) { } }
private void SendRandomizedProgramToLoggedInUser() { try { var from = GetFromAddress(_movidAppContext.Clinic, _movidAppContext.LoggedInUser); var subject = GenerateProgramEmailSubject(_movidAppContext.Clinic); var url = string.Format("http://app.movidhep.com/program/sample/{0}/{1}", _movidAppContext.Clinic.Id, _movidAppContext.LoggedInUser.Id); var body = new StringBuilder(); body.AppendFormat("<html><p>Hi {0}</p>", _movidAppContext.LoggedInUser.Email); body.AppendFormat("<p>{0}</p>", _movidAppContext.Clinic.EmailMessage); body.Append("<p>Your new Program is available at:"); body.AppendFormat("<a href='{0}'> {0} </a></p></html> ", url); SendGridEmailer.Send(from, new List <string> { _movidAppContext.LoggedInUser.Email }, subject, body.ToString(), null, null, true); } catch (CookieException) { } }
private void NewAccountOpened(string email) { try { var subject = "John from Movid HEP with your account details"; string url = "https://app.movidhep.com/account/login"; var body = new StringBuilder(); body.AppendFormat("<html><p>Hey {0}</p>", email); body.Append(@"<p>This is John from Movidhep. Thanks for signing up!</p>"); body.Append("<p>If you have any questions please feel free to connect with me by replying directly to this email ([email protected]) or giving me a call at 8607782522.</p>"); body.Append("<p>Use the following link to sign in to your account here:</p>"); body.AppendFormat("<a href='{0}'> {0} </a></p><p>Best,<br />-John</p></html>", url); var trackingIdentifers = new Dictionary <string, string>(); trackingIdentifers["emailAccount"] = email.ToString(); SendGridEmailer.Send("*****@*****.**", new List <string> { email }, subject, body.ToString(), trackingIdentifers, "account-registered", true); } catch (CookieException) { } }
private void SendToPatient(string email, int programId, string shortUrl) { try { var from = GetFromAddress(_movidAppContext.Clinic, _movidAppContext.LoggedInUser); var subject = GenerateProgramEmailSubject(_movidAppContext.Clinic); var url = string.Format("http://app.movidhep.com/Program/{0}", shortUrl); var body = new StringBuilder(); body.AppendFormat("<html><p>Hi {0}</p>", email); body.AppendFormat("<p> {0}</p>", _movidAppContext.Clinic.EmailMessage); body.Append("<p>Your new Program is available at:"); body.AppendFormat("<a href='{0}'> {0} </a></p></html> ", url); var trackingIdentifers = new Dictionary <string, string>(); trackingIdentifers["programId"] = programId.ToString(); SendGridEmailer.Send(from, new List <string> { email }, subject, body.ToString(), trackingIdentifers, "Program-sent", true); } catch (CookieException) { } }