Send Basic Email





9
Date Submitted Tue. Oct. 11th, 2005 9:50 PM
Revision 1 of 1
Helper ses5909
Tags CSharp | Email | Send
Comments 0 comments
Send Basic Email
// create mail message object
MailMessage myMail = new MailMessage();
myMail.From = "from@youremail.com"; //the "from" address     
myMail.To = "to@theiremail.com"; //the "to" address         
myMail.Subject = "Howdy"; //your "subject"
myMail.Body = "Just wanted to say Hi. How are you?"; //message body     
SmtpMail.SmtpServer = "localhost"; //the mailserver

//send the email
SmtpMail.Send(myMail);

Sara Smith

www.ilovecode.com
Sara

ilovecode

Comments

There are currently no comments for this snippet.

Voting