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
Pintoo Yadav
NA
2.1k
404.5k
hi am geting this error Failure sending mail. pls help me
Aug 6 2015 7:51 AM
my code is
try
{
//Mail Message
MailMessage mM = new MailMessage();
mM.From = new MailAddress("
[email protected]
");
//receiver email id
mM.To.Add("
[email protected]
");
mM.Subject = "Text H2H Mail";
File.Copy("D:\\ClientMgmtDb1.accdb", "D:\\ClientMgmtDb21.accdb", true);
mM.Attachments.Add(new Attachment(@"D:\\ClientMgmtDb21.accdb"));
mM.Body = "Log_Fole";
mM.IsBodyHtml = true;
// SmtpClient sC = new SmtpClient("smtp.WorldClient.com");
SmtpClient sC = new SmtpClient("192.168.100.10");
// SmtpClient.UseDefaultCredentials = true;
sC.Port = 25;
sC.Credentials = new NetworkCredential("
[email protected]
", "pintoo@123");
sC.EnableSsl = false;
sC.Send(mM);
MessageBox.Show("Mail send Successfully..Thanks");
mM.Dispose();
File.Delete("D:\\ClientMgmtDb21.accdb");
}
catch (Exception ex)
{
MessageBox.Show("Error" + ex.Message.ToString());
}
Reply
Answers (
1
)
Extended Text box controls in C#
How to count number of prints taken from a printer using WPF