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
Rahul M
NA
7
0
Error in sending mail
Aug 8 2009 3:49 AM
I have done a program to send email using yahoo smtp but it is showing an exception "failed to send mail"
following is the code
friends pls help
try
{
MailMessage objMsg = new MailMessage();
objMsg.To.Add(new MailAddress("address"));
objMsg.From = new MailAddress("address");
objMsg.Subject = "subject";
objMsg.Body = "test mail";
SmtpClient sc = new SmtpClient();
sc.Host = "smtp.mail.yahoo.com";
sc.Port = 465;
sc.Credentials = new NetworkCredential("address", "password");
sc.EnableSsl = false;
sc.DeliveryMethod = SmtpDeliveryMethod.Network;
sc.Send(objMsg);
MessageBox.Show("mail send");
}
catch (System.Exception ex)
{
MessageBox.Show(ex.Message);
}
Reply
Answers (
2
)
c# web services
Ascending-Descending the numbers?