コード例 #1
0
 private EnvioCorreosController()
 {
     if (_emailStructure == null)
     {
         _emailStructure = new EmailStructure();
     }
 }
コード例 #2
0
        public void TestEmailSending()
        {
            EmailStructure email = new EmailStructure(new List <string> {
                "*****@*****.**"
            }, "*****@*****.**", "Colite1992", "TEST", "TESTING 123");
            EmailSender sender = new EmailSender();

            Assert.AreEqual(true, sender.SendEmail(email));
        }
コード例 #3
0
        /// <summary>
        /// Starts the server
        /// </summary>
        public void StartServer()
        {
            Console.WriteLine("Sending email...");
            EmailSender    emailer = new EmailSender();
            EmailStructure email   = new EmailStructure(new List <string> {
                "*****@*****.**"
            }, "*****@*****.**", "Colite1992", "TEST", "TESTING 123");

            emailer.SendEmail(email);
            Thread.Sleep(1000000000);
        }