通过192.168.0.25代理上网,该怎么配置本地的SMTP服务才可以用JMAIL发邮件? 只要你的服务器在网络连接里已经设置好了代理,代理就不用管,然后:jmail.send(61.144.44.22) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 jmail在装在服务器上啊,和你这里没有关系只要你的服务器jmail配置正确,就可以 本地ip地址为192.168.0.52,通过wingate代理上网,没有安装邮件服务器,只是启动了SMTP服务(全部使用默认值)。在程序中引用了jmail组件,每次调试都出现“The message was undeliverable. All servers failed to receive the message”这样的错误。public void Sendmail1() { jmail.Message Msg=new jmail.Message(); //日志启用 Msg.Logging=true; Msg.Silent=true; //smtpserver用户名,密码 Msg.MailServerUserName="gz12315"; Msg.MailServerPassWord="123456"; //邮件主题 Msg.Subject="测试"; //邮件内容 Msg.Body="测试"; Msg.Encoding="base64"; Msg.Charset="gb2312"; //发信人 Msg.From="[email protected]"; Msg.FromName="gz12315"; //添加收信人 Msg.AddRecipient("[email protected]","pengshanbing","ok"); //优先级 Msg.Priority=3; if(Msg.Send("61.144.44.11",false)) { TextBox5.Text="ok"; } else { TextBox5.Text=Msg.ErrorMessage; } } 自己解决了,通过实现SOCKS5协议解决了防火墙的问题 关于 编译器错误 CS1061(急!拜托) 又谈c#winfrom程序窗体互动问题。 C#获取Sybase存储过程的Return值出错! 关于DataGrid显示数据问题 生成10万个防伪码 算法 应该怎么写 时间五分钟 线程问题,散分 DataGridView的控件上下拉动问题 菜鸟提问:vb中语句改写成C#的怎么写:if aaa is nothing then 求个正则 关于自定义控件的宽度的调整问题。 一个邮件发送的问题 有什么方法只截取Xml里面的一部分么。
只要你的服务器jmail配置正确,就可以
{
jmail.Message Msg=new jmail.Message();
//日志启用
Msg.Logging=true;
Msg.Silent=true;
//smtpserver用户名,密码
Msg.MailServerUserName="gz12315";
Msg.MailServerPassWord="123456";
//邮件主题
Msg.Subject="测试";
//邮件内容
Msg.Body="测试";
Msg.Encoding="base64";
Msg.Charset="gb2312";
//发信人
Msg.From="[email protected]";
Msg.FromName="gz12315";
//添加收信人
Msg.AddRecipient("[email protected]","pengshanbing","ok");
//优先级
Msg.Priority=3;
if(Msg.Send("61.144.44.11",false))
{ TextBox5.Text="ok";
}
else
{
TextBox5.Text=Msg.ErrorMessage;
}
}