从asp.net发送邮件到邮件帐户 [英] sending mail from asp.net to mail account

查看:76
本文介绍了从asp.net发送邮件到邮件帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

mm.From =新MailAddress(fromtext.Text);
mm.To.Add(新MailAddress(ToText.Text));
mm.Subject = SubjectText.Text;
mm.Body = MessageText.Text;
我遇到这样的错误.任何人都可以采取哪些措施来消除这些错误.
错误是2该名称在当前上下文中不存在

mm.From = new MailAddress(fromtext.Text);
mm.To.Add(new MailAddress(ToText.Text));
mm.Subject = SubjectText.Text;
mm.Body = MessageText.Text;
I am getting errors like this.can anyone what should be done to remove these erors.
error is 2 The name does not exist in the current context

推荐答案

哪些错误?您没有发布任何错误.无论如何,您的问题很可能是您没有提供任何凭据.
What errors? You didn''t post any errors. Anyway, your problem is likely that you are not providing any credentials.


这篇关于从asp.net发送邮件到邮件帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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