bhuraasif
May 15th, 2007, 07:27 AM
Hi everyone
I have been trying to send email from local computer(localhost).but i couldnt succeed.
here is code
Please help me to send mail from local computer(localhost) using SmtpClient.
MailMessage msg = new MailMessage("asifondemand@yahoo.com", "asifondemand@yahoo.com");
SmtpClient smcl = new SmtpClient();
smcl.Host = "localhost";
smcl.Port = 25;
msg.Body = "testing to send bulk mail";
msg.Subject = "bulk mail";
msg.Priority = MailPriority.High;
msg.IsBodyHtml = false;
msg.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
smcl.UseDefaultCredentials = true;
smcl.Send(msg);
but it give me error,
Please help me or show me some article.
Regards,
ASIF
I have been trying to send email from local computer(localhost).but i couldnt succeed.
here is code
Please help me to send mail from local computer(localhost) using SmtpClient.
MailMessage msg = new MailMessage("asifondemand@yahoo.com", "asifondemand@yahoo.com");
SmtpClient smcl = new SmtpClient();
smcl.Host = "localhost";
smcl.Port = 25;
msg.Body = "testing to send bulk mail";
msg.Subject = "bulk mail";
msg.Priority = MailPriority.High;
msg.IsBodyHtml = false;
msg.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
smcl.UseDefaultCredentials = true;
smcl.Send(msg);
but it give me error,
Please help me or show me some article.
Regards,
ASIF