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
How to Send Email using MailMessage
Mukesh Kumar
Nov 19
2015
Code
940
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
string
fromEmail = ConfigurationManager.AppSettings[
"EmailID"
].ToString();
string
toEmail = txtEmailId.Text.Trim();
MailMessage message =
new
MailMessage(fromEmail, toEmail);
message.Subject = txtSubject.Text.Trim();
message.Body = txtBody.Text.Trim();
SmtpClient smtp =
new
SmtpClient();
smtp.Send(message);
C#
Send Email using MailMessage
ASP.NET