Exemplo n.º 1
0
        public static void SendEmail(string messageText)
        {
            MeljabCredentials  meljabCredentials = new MeljabCredentials();
            ICredentialsByHost creds             = meljabCredentials.GetCredential();

            SchwabenCode.EasySmtp.GMailSmtp gmailSmtp = new GMailSmtp(creds);
            MailMessage mailMessage = new MailMessage("*****@*****.**", "*****@*****.**", "From MeljabUtility: Your External IP Address", messageText);

            gmailSmtp.Send(mailMessage);
        }
Exemplo n.º 2
0
        public static void SendEmail(string from, string to, string subject, string messageText)
        {
            MeljabCredentials  meljabCredentials = new MeljabCredentials();
            ICredentialsByHost creds             = meljabCredentials.GetCredential();

            SchwabenCode.EasySmtp.GMailSmtp gmailSmtp = new GMailSmtp(creds);
            MailMessage mailMessage = new MailMessage(from, to, subject, messageText);

            gmailSmtp.Send(mailMessage);
        }