SendUsing"配置值无效.在asp.net中发送邮件时出错 [英] SendUsing" configuration value is invalid. error in sending mail in asp.net

查看:114
本文介绍了SendUsing"配置值无效.在asp.net中发送邮件时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SendUsing"配置值无效.在asp.net网站中发送邮件时出错.

我的网址:vjcet.ac.in

在此站点中,有一个"srror SendUsing"配置值无效.在发送邮件期间

.
我的代码是

SendUsing" configuration value is invalid. error in sending mail in asp.net website.

my url:vjcet.ac.in

in this site hava an srror SendUsing" configuration value is invalid.during send mail

.
my code is

MailMessage mail1 = new MailMessage();
mail1.From = txtEmail.Text;
// ds = FillDataset.ReadXml(Server.MapPath("~/Admin/XML/feedbackmail.xml"));
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("~/Admin/xml/feedbackmail.xml"));
string ToAddress = ds.Tables[0].Rows[0][0].ToString();

// mail1.To = "feedback@stpius.ac.in";
mail1.To = ToAddress;
mail1.Subject = txtComments.Text;

mail1.Body = "Sender : " + txtEmail.Text + "\n" + "Name : " + txtname.Text + "\n" + "Address : " + txtCity.Text + "\n" + "Phone No:  : " + txtFax.Text + "\n" + "Email:" + txtEmail.Text + "\n" + "Message :" + txtCountry.Text + "\n" + "Body :" + txtComments.Text;
SmtpMail.SmtpServer.Insert(0, "27.251.157.141");

SmtpMail.Send(mail1);



我认为我的IP地址不是currect.but在命令提示符下我检查ping vjcet.ac.in现在我得到的是27.251.157.141

有人可以帮助我



I think my ip address is not currect.But in command prompt i checked ping vjcet.ac.in now i got this same is 27.251.157.141

any one please help me

推荐答案

此处开始. [ ^ ]这将引导您完成如何手动测试SMTP.如果无法通过这种方式工作,则必须从管理员那里获取正确的值.如果可以,请检查您的代码并确保正确设置了所有设置.
Start here.[^] This walks you through how to test SMTP manually. If it does not work this way you will have to get the correct values from your admin. If it does work then check your code and make sure all settings are getting set properly.


这篇关于SendUsing"配置值无效.在asp.net中发送邮件时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆