菜鸟提问关于发送需要smtp验证mail的方法
各位老师近日我用asp.net and vb.net编写了一个发送mail的程序,参考了下面的代码,但是还是提示:CDO.message错误,小鸟不明白mail.fields.add的http://schemas.microsoft.com/cdo/configuration/smtpauthenticate参数是什么东西,望各位达人详细解答(最好用vb.net语言解释,c#俺不懂).
<%@ Import Namespace="System.Web.Mail" %>
<script runat="server">
MailMessage mail=new MailMessage();
mail.From="service@brookes.com";
mail.To="brookes@brookes.com";
mail.BodyFormat=MailFormat.Text;
mail.Body="a test smtp mail.";
mail.Subject="hello."
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "brookes"); //set your username here
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "walkor"); //set your password here
SmtpMail.SmtpServer="lsg.moon.net";
SmtpMail.Send(mail);
</script>
<%@ Import Namespace="System.Web.Mail" %>
<script runat="server">
MailMessage mail=new MailMessage();
mail.From="service@brookes.com";
mail.To="brookes@brookes.com";
mail.BodyFormat=MailFormat.Text;
mail.Body="a test smtp mail.";
mail.Subject="hello."
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "brookes"); //set your username here
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "walkor"); //set your password here
SmtpMail.SmtpServer="lsg.moon.net";
SmtpMail.Send(mail);
</script>
...全文
相关推荐
python3实现163邮箱SMTP发送邮件
菜鸟教程和其他在线资源也会提供一些常见问题的解决方法。此外,本文还提到了一个名为孙华强的博客,作为参考源。这表明,在开发过程中,获取和参考其他人的经验是非常有帮助的。
asp.net 邮件 发送
**SMTP服务**:SMTP(Simple Mail Transfer Protocol)是互联网上用于发送电子邮件的标准协议。
Python使用QQ邮箱发送邮件实例与QQ邮箱设置详解
然后,我们连接到QQ邮箱的SMTP服务器(smtp.qq.com),通过465端口使用SMTP_SSL进行安全连接。使用`login()`方法登录邮箱,并通过`sendmail()`发送邮件。
ASP中级菜鸟秘籍超级经典之作
**利用asp发信**ASP可以用来发送电子邮件,通常通过SMTP(Simple Mail Transfer Protocol)服务实现。这在通知用户、订阅服务、发送验证码等场景下十分常见。
Exchange Server 2003 之菜鸟安装教程
确保选中ASP.NET、IIS、SMTP、NNTP和万维网服务。3. **验证安装**:安装完成后,通过“服务”管理工具检查NNTP、SMTP和万维网服务的状态,确保它们已安装且启动。


