Ejemplo n.º 1
0
 //actions
 public bool Send()
 {
     try
     {
         ExigoDAL.SendEmail(request);
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Ejemplo n.º 2
0
        public static void SendEmailVerification(int customerID, string email)
        {
            // Create the publicly-accessible verification link
            string sep = "&";

            if (!GlobalSettings.Emails.VerifyEmailUrl.Contains("?"))
            {
                sep = "?";
            }

            string encryptedValues = Security.Encrypt(new
            {
                CustomerID = customerID,
                Email      = email,
                Date       = DateTime.Now
            });

            var verifyEmailUrl = GlobalSettings.Emails.VerifyEmailUrl + sep + "token=" + encryptedValues;


            // Send the email
            ExigoDAL.SendEmail(new SendEmailRequest
            {
                To      = new[] { email },
                From    = GlobalSettings.Emails.NoReplyEmail,
                ReplyTo = new[] { GlobalSettings.Emails.NoReplyEmail },
                Subject = "{0} - Verify your email".FormatWith(GlobalSettings.Company.Name),
                Body    = @"
                    <p>
                        {1} has received a request to enable this email account to receive email notifications from {1} and your upline.
                    </p>

                    <p> 
                        To confirm this email account, please click the following link:<br />
                        <a href='{0}'>{0}</a>
                    </p>

                    <p>
                        If you did not request email notifications from {1}, or believe you have received this email in error, please contact {1} customer service.
                    </p>

                    <p>
                        Sincerely, <br />
                        {1} Customer Service
                    </p>"
                          .FormatWith(verifyEmailUrl, GlobalSettings.Company.Name)
            });
        }