Пример #1
0
 public void TestSendMailSendsAnEmail()
 {
     DbEmail testMail = new DbEmail();
     testMail.Sender = "*****@*****.**";
     testMail.Recipient = "*****@*****.**";
     testMail.Subject = "hi hinnah";
     testMail.Body = "test";
     SendComInteropEmail email = new SendComInteropEmail();
     Assert.IsTrue(email.SendMail(testMail));
 }
Пример #2
0
        public bool EmailPassword(string username)
        {
            try
            {
                DbEmail mail = new DbEmail();
                mail.Sender = "*****@*****.**";
                mail.Recipient = username + "@fdmgroup.com";
                mail.Subject = " your password";
                mail.Body = "Dear " + username + "! Your password is : " +Read(username) +
                            " Thank you!";

                SendComInteropEmail sendMail = new SendComInteropEmail();
                sendMail.SendMail(mail);
                return true;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            return false;
        }
Пример #3
0
        public bool EmailPassword(string username)
        {
            try
            {
                DbEmail mail = new DbEmail();
                mail.Sender    = "*****@*****.**";
                mail.Recipient = username + "@fdmgroup.com";
                mail.Subject   = " your password";
                mail.Body      = "Dear " + username + "! Your password is : " + Read(username) +
                                 " Thank you!";

                SendComInteropEmail sendMail = new SendComInteropEmail();
                sendMail.SendMail(mail);
                return(true);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            return(false);
        }
Пример #4
0
 public bool SendUserEmail(DbEmail email)
 {
     ISendEmail mail = new SendComInteropEmail();
     return mail.SendMail(email);
 }