TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Send Mail Faster using C#
Sanjeev Bhojan
May 22
2015
Code
2.7
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
System.Diagnostics.Stopwatch sWatch =
new
System.Diagnostics.Stopwatch();
sWatch.Start();
MailMessage mail =
new
MailMessage();
MailMessage mailAdmin =
new
MailMessage();
SmtpClient SmtpServer =
new
SmtpClient();
mail.From =
new
MailAddress(
"
[email protected]
"
);
mail.To.Add(
[email protected]
);
mail.Subject =
"faster Sending email"
;
mail.Body = htmlProcessed;
mail.IsBodyHtml =
true
;
SmtpServer.Host = smtp.gmail.com";
SmtpServer.Port = 25;
//SmtpServer.Timeout = 10000;
SmtpServer.Credentials =
new
System.Net.NetworkCredential(
"test@your'smail.com"
,
"123@123"
);
SmtpServer.EnableSsl =
false
;
SmtpServer.Send(mail);
result =
true
;
// LogFile(Convert.ToString(mail.From), Convert.ToString(mail.To), result);
sWatch.Stop();
C#
Send Mail Faster using C#
sending Mail