问题描述
我在发送电子邮件时遇到问题
描述如下:-
实际上,我可以通过提供用户名和密码来通过gmail发送电子邮件.
但是我必须通过不提供用户名和密码来做到这一点.
我正在国家信息中心工作,smtp服务器的名称为mail.nic.in
我从最近2天开始尝试该程序,但是我失败了
如果您有
hi ,
i have a problem in sending e-mail
the description as below:-
Actually i am able to send email through gmail by providing username and password .
but i have to do this by not providing username and password .
I am working in National Informatics Centre and ther smtp server name is mail.nic.in
and i trying for this programme from last 2 days but m failed
please provide sum code sample help if u have
推荐答案
<system.net>
<mailSettings>
<smtp from="abc@somedomain.com">
<network host="somesmtpserver" port="25" userName="name" password="pass" defaultCredentials="true" />
</smtp>
</mailSettings>
</system.net>
如果需要,请查看此Microsoft Video教程:
使用ASP.NET发送来自网站的电子邮件 [ ^ ]
如果需要的话,此站点上有很多关于如何发送电子邮件的文章
If needed, have a look at this Microsoft Video tutorial:
Use ASP.NET to send Email from Website[^]
If needed, there are lots of article on this very site on how to send emails
这篇关于发送电子邮件问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!