private void SendForgotPasswordEmail(string Email, string PasswordActivationCode)
        {
            MailMessage mail = new MailMessage();
            DefaultData dt   = new DefaultData();

            //set the addresses
            mail.From = new MailAddress(dt.postmaster); //IMPORTANT: This must be same as your smtp authentication address.
            mail.To.Add(Email);


            //set the content
            mail.Subject = "TerraTech Forgot Password";
            mail.Body    =
                "Forgotten your TerraTech password? No worries — it happens!" + Environment.NewLine +

                "Your Account Activation Code is: " + PasswordActivationCode + Environment.NewLine + Environment.NewLine;

            //send the message
            SmtpClient smtp = new SmtpClient(dt.mail);

            //IMPORANT:  Your smtp login email MUST be same as your FROM address.
            NetworkCredential Credentials = new NetworkCredential(dt.postmaster, dt.password);

            smtp.UseDefaultCredentials = false;
            smtp.Credentials           = Credentials;
            smtp.Port      = 8889; //alternative port number is 8889
            smtp.EnableSsl = false;
            smtp.Send(mail);
        }
        private void SendEmail(string Email, string VerificationCode)
        {
            MailMessage mail = new MailMessage();
            DefaultData dt   = new DefaultData();

            //set the addresses
            mail.From = new MailAddress(dt.postmaster); //IMPORTANT: This must be same as your smtp authentication address.
            mail.To.Add(Email);


            //set the content
            mail.Subject = "TerraTech Confirmation Email";
            mail.Body    =
                "Thank you for registering your account information into the system!" + Environment.NewLine +

                //  "Your confirmation code is: " + VerificationCode + Environment.NewLine + Environment.NewLine +
                "Confirm your account now by clicking at this link" + Environment.NewLine + "https://www.TerraTechBG.com/Activation/Index?VerificationCode=" + VerificationCode;

            //send the message
            SmtpClient smtp = new SmtpClient(dt.mail);

            //IMPORANT:  Your smtp login email MUST be same as your FROM address.
            NetworkCredential Credentials = new NetworkCredential(dt.postmaster, dt.password);

            smtp.UseDefaultCredentials = false;
            smtp.Credentials           = Credentials;
            smtp.Port      = 8889; //alternative port number is 8889
            smtp.EnableSsl = false;
            smtp.Send(mail);
        }
        private void SendPasswordChangedEmail(string Email)
        {
            MailMessage mail = new MailMessage();
            DefaultData dt   = new DefaultData();

            //set the addresses
            mail.From = new MailAddress(dt.postmaster); //IMPORTANT: This must be same as your smtp authentication address.
            mail.To.Add(Email);


            //set the content
            mail.Subject = "TerraTech Password Changed";
            mail.Body    =
                "This is to notify you that your password has been changed!" + Environment.NewLine;

            //send the message
            SmtpClient smtp = new SmtpClient(dt.mail);

            //IMPORANT:  Your smtp login email MUST be same as your FROM address.
            NetworkCredential Credentials = new NetworkCredential(dt.postmaster, dt.password);

            smtp.UseDefaultCredentials = false;
            smtp.Credentials           = Credentials;
            smtp.Port      = 8889; //alternative port number is 8889
            smtp.EnableSsl = false;
            smtp.Send(mail);
        }