Created
February 25, 2010 18:57
-
-
Save robertgreiner/314906 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MailManager { | |
public void send(String subject, String body) { | |
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(); | |
message.To.Add("[email protected]"); | |
message.Subject = subject; | |
message.From = new System.Net.Mail.MailAddress("[email protected]"); | |
message.Body = body; | |
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient(); | |
smtp.Host = "host"; | |
smtp.Port = 25; | |
smtp.Send(message); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment