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
asif basha
NA
41
0
How can i eliminate this error??
Aug 20 2009 5:25 AM
MailMessage mail = new MailMessage();
mail.To = "
[email protected]
";
mail.From = "
[email protected]
";
mail.Subject = "this is a test email.";
mail.Body = "this is my test email body.";
MailAttachment attachment = new MailAttachment(Server.MapPath("somemail1.txt")); //create the attachment
mail.Attachments.Add(attachment); //add the attachment
SmtpMail.SmtpServer = "localhost"; //your real server goes here
SmtpMail.Send(mail);
While running this code Im gettin error saying:transport failed to connect to the server
Reply
Answers (
2
)
How to embed image which should be generated dynamically in a mail
How to unlock a dynamically generated assembly once I have used it from within main application?