我只是想让我的hmailserver从我的C#程序发送邮件.杀死我的部分是SSL部分.
我最初得到这个错误: The SMTP server requires a secure connection or the client was not authenticated. The server response was: SMTP authentication is required.
所以我补充说:smtp.EnableSsl = true; 现在我明白了Server does not support secure connections.
这是我的代码,这让我疯了.我是否必须创建自己的SSL或者是否有办法在hmailserver端禁用SSL?
MailMessage mail = new MailMessage("jlnt@ademo.net", "com", "NEW Item", emailBody);
SmtpClient smtp = new SmtpClient("1.1.1.250");
smtp.Port = 25;
NetworkCredential login = new NetworkCredential("ja@test.net", "dg");
smtp.Credentials = login;
smtp.EnableSsl = true;
smtp.UseDefaultCredentials = false;
smtp.Send(mail);
Run Code Online (Sandbox Code Playgroud)
小智 5
啊,好吧你要做的是在HMailServer中转到advanced-ip范围.创建新的IP范围,例如,如果您使用192.168.1.2,则必须使范围为192.168.1.1-192.168.1.3,然后在底部取消选中所有必需的smtp身份验证框.
恼人的...
| 归档时间: |
|
| 查看次数: |
5559 次 |
| 最近记录: |