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
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dipali Patil
NA
72
79.3k
How to Send Email In Asp.net 2.0
Oct 25 2010 5:10 AM
How to Send Email In Asp.net 2.0 ?
I use following code but it is not work ......
string
UserFNameCase = txtname.Text;
string
dsCenter = ddlDistribution.SelectedItem.Text;
string
MailSub =
"Registration Information."
;
string
EventDescription =
"<html><body> Dear "
+ UserFNameCase +
", <br /> Your Serial No is <b>"
+ SerialNo +
"</b> . Please collect your Id card From <b>"
+ dsCenter +
" </b> after 2 bussiness days .</body></html>"
;
MailMessage
mail =
new
MailMessage
();
mail.IsBodyHtml =
true
;
mail.Subject =
"Registration Information."
;
mail.Body = EventDescription;
mail.From =
new
MailAddress
(
"
[email protected]
"
);
mail.To.Add(txtEmail.Text);
SmtpClient
smtp =
new
SmtpClient
(
"localhost"
);
//smtp.Host = "127.0.0.1";
smtp.Host =
"LocalHost"
;
smtp.Credentials =
new
NetworkCredential(
"username"
,
"secret"
);
////smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
smtp.Send(mail);
Reply
Answers (
4
)
Need to get number of days from Datetime
Beginner Problem with StreamWriter