08 July 2007
Using Mail Message instead of SmtpMail
using
System;
using
System.Net;
using
System.Net.Mail;
namespace
SmtpSample
{
class
Program
{
static
void
Main(
string
[] args)
{
MailMessage
message =
new
MailMessage
();
message.From =
new
MailAddress
(
"john_doe@users.com"
);
message.To.Add(
"jane_doe@users.com"
);
message.Subject =
"SMTP MailMessage"
;
message.Body =
"SMTP MailMessage"
;
message.BodyEncoding = System.Text.
Encoding
.ASCII;
message.IsBodyHtml =
true
;
message.Priority =
MailPriority
.Normal;
SmtpClient
smtp =
new
SmtpClient
(
"localhost"
);
smtp.Send(message);
}
}
}
Comments
No Comments
Home
SoftwareNotes
RSS
Atom
Recent Posts
Search Parameters in Gmail
Geode
Geolocation
What goes into a great technical presentation?
Identity
Tags
BizTalk Microsoft
Geode
Geolocation GPS
Gmail
JavaScript
LINQ
POX
REST
Serialization
silverlight
SMTP
Streaming
svcutil
TcpTrace
Visual Studio
WCF
Archives
February 2009 (1)
January 2009 (14)
April 2008 (1)
March 2008 (1)
December 2007 (1)
November 2007 (4)
October 2007 (1)
September 2007 (3)
August 2007 (4)
July 2007 (8)
Search
Go
Navigation
Home
Blogs
Photos
Downloads