The following code i had used to send e-mail in my application,
using System.Web.Mail;
System.Web.Mail.MailMessage message = new System.Web.Mail.MailMessage();
message.From = "xyz@yahoo.com";
message.To = "xyz@yahoo.com";
message.Subject = "TestMail";
message.Body = "Test Mail";
message.BodyFormat = MailFormat.Text;
SmtpMail.SmtpServer = "smtp.mail.yahoo.com";
System.Web.Mail.SmtpMail.Send(message);
It's working properly in my system but when i run the same in another system it doesn't work there. It shows up with 'The "SendUsing" configuration value is invalid.' error occurs. I'm unable to proceed so kindly suggest some idea to开发者_C百科 solve this. Thanx in advance.
Check SMTP server setup for "other" computer. If the only code is presented here, most probabbly the problem is in not correct SMTP serevr configuration.
Regards.
精彩评论