开发者

"SendUsing" configuration value is invalid

开发者 https://www.devze.com 2023-03-22 00:05 出处:网络
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();

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消