示例#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);
        }
示例#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);
        }