求教:用asp.net自带的邮件发送类,发邮件时,怎么定义发件人的名称和发件人电子邮件地址 比如说:我用[email protected]这个帐号作为邮件服务器发送邮件但是我想别人看见邮件时,显示发件人“张三”,发件人电子邮箱“[email protected]”请问应该怎么做?? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 MailMessage newmail = new MailMessage(); newmail.From="*********@citiz.net"; newmail.BodyFormat=MailFormat.Html; newmail.Priority = MailPriority.High; newmail.To="[email protected]"; newmail.Subject=subject; newmail.Body=body; newmail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate","1"); //basic authentication newmail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "username");//set your username here newmail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password");//set your password here MailAttachment attachment = new MailAttachment(saveName); newmail.Attachments.Add(attachment); SmtpMail.SmtpServer="www.citiz.net"; SmtpMail.Send(newmail); 个人看法 现在的邮件程序都发不出去------------------------http://fenglin.xland.cn------------------------ 二楼的这种方法,newmail.From="*********@citiz.net";这里必须写用来发送的邮箱的验证信息,不能写任意的啊 Click the link to solve your problem.Good luck! 大家在日常开发中用.net MVC多吗?? ASP.NET MVC中怎么实现每行显示多条记录 asp_net上传文件到另一台服务器的问题 发现一个奇怪的事,不解:msi程序可以自动运行? 文字如何不换行适应单元格? 搞了几天了,再发一贴! 高分求1条不难的sql语句,在线等. 在asp.net中引用xx.dll的问题 动态生成控件的问题。 大家帮我看看,js和aspx结合的问题。 请教,我现在使用AjaxPro进行登陆验证,没有使用表单提交方式,打算不再使用图形验证码,可行吗? IIS里配的404错误,为什么对aspx文件不起作用?
newmail.From="*********@citiz.net";
newmail.BodyFormat=MailFormat.Html;
newmail.Priority = MailPriority.High;
newmail.To="[email protected]";
newmail.Subject=subject;
newmail.Body=body;
newmail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate","1"); //basic authentication
newmail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "username");//set your username here
newmail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password");//set your password here
MailAttachment attachment = new MailAttachment(saveName);
newmail.Attachments.Add(attachment);
SmtpMail.SmtpServer="www.citiz.net";
SmtpMail.Send(newmail);
------------------------
http://fenglin.xland.cn
------------------------