日期:2014-05-18  浏览次数:20418 次

搞定这个,贴2000分相赠,决不食言,VS2005中的收邮件和发邮件。
email:by_cap@163.com

------解决方案--------------------
哈哈...csdn分数这么值得啊?
------解决方案--------------------
我这有个 发邮件的:
using System.Web.Mail;
public void SendMail()
{
MailMessage objMail = new MailMessage();
objMail.From=t“发件人邮件地址”;
objMail.To= "收邮件地址 ";
objMail.BodyFormat=MailFormat.Html;
objMail.Subject= "主题 ";
string str= "内容 ";
objMail.Body=str;
System.Web.Mail.SmtpMail.SmtpServer= "220.130.130.*** ";
System.Web.Mail.SmtpMail.Send(objMail);
}
当然 VS2005的话 可以用 using System.Web.Net;
下的操作 更好。我就不写了。

------解决方案--------------------
顶.楼住分有那么多?
------解决方案--------------------
http://www.codeproject.com/useritems/SendMailSMTPWebConfig.asp
This articles educates you to send mails using SMTP mail server in HTML format. It makes use of default settings from the web.config for sending e-mail.


http://www.codeproject.com/aspnet/EWSWebPt3.asp
Introduction
The BasePage class e-mail features
Two common approaches
The BasePage class benefits
How it works
The EMailRenderedPage property
The Render method
The RenderForEMail method
E-mail event handlers
The EMailThisPage event
The EMailError event
Connecting the event handlers
Conclusion
Revision history

------解决方案--------------------
我以前和你遇到了同样的问题 在自己XP机器上测试的时候是成功的
但是一传到服务器上就出现诸如这样的提示:
"服务器拒绝了一个或多个收件人地址。服务器响应为: 550 Local user only or Authentication mechanism "

说是要这样写:
using System.Web.Mail
MailMessage mail = new MailMessage();
mail.From = "xiaotupansy@163.com ";
mail.To= "xiaotupansy@163.com ";
mail.Subject = "1111111111 ";
mail.Body = "2222222222222 ";
mail.Fields[ "http://schemas.microsoft.com/cdo/configuration/sendusername "] = "用户名 ";
mail.Fields[ "http://schemas.microsoft.com/cdo/configuration/sendpassword "] = "密码 ";
mail.Fields[ "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate "] = 1;
mail.Fields[ "http://schemas.microsoft.com/cdo/configuration/languagecode "] = 0x0804;
SmtpMail.SmtpServer = "smtp.163.com ";
SmtpMail.Send(mail);


注意加 这个mail.Fields

这样了而且说还只能接受163的邮件

我也没有搞出来 我就想什么邮件都可以发 什么邮件都没有收

还是没有搞出来

我们没有自己的服务器 什么163的这么办啊 就不能接所有的邮件了吗

请高手解决
lz一起解决下啊 呵呵
------解决方案--------------------
用你邮箱的邮件服务器.
你是codeproject.com搜索一下有个新加坡人写了个项目
------解决方案--------------------
我还一位新加坡人是说中文的了 原来也是说英文的啊 艾
------解决方案--------------------
2k 有这么多?

偶得去看看偶多少
------解决方案--------------------
你想做什么
说详细点
我只能借助第3方的邮件服务器来收发
------解决方案--------------------
在03里面到是写过发,收邮件还不会。05还没做过,应该差不多。
UP一下!
------解决方案--------------------
我给你搞定发送邮件的
http://community.csdn.net/Expert/topic/5583/5583067.xml?temp=.1522028
JMAIL实现我有源码