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); }
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); }