将端口587用于所有客户端到MTA通信的趋势越来越明显.它位于标准跟踪RFC:http://www.ietf.org/rfc/rfc2476.txt
我的问题是"为什么?".为什么有两个SMTP服务器实例在同一台服务器上运行,如果它们都做同样的事情?它提供了什么安全功能,除了给我两个作为管理员进行故障排除的事情.
这似乎是不必要的复杂性,除非ISP阻止端口25,否则不需要.即使这样,如果ISP阻止端口25以防止垃圾邮件,它只是意味着它只需要更多的时间,直到端口587也被阻止,我们将不得不完全使用不同的端口.
看起来我们正在为自己创造更多的工作,而不是解决问题并开始验证SMTP
当我使用第三方SMTP服务器发送电子邮件时,我可以从EC2实例发送的电子邮件数量有限制吗?我使用EC2实例来调用客户端的smtp服务器.
谢谢Santhosh
遇到 PHP 错误
严重性:警告
消息:stream_socket_enable_crypto():SSL 操作失败,代码为 1。OpenSSL 错误消息:错误:14090086:SSL 例程:ssl3_get_server_certificate:证书验证失败
文件名:libraries/Email.php
行号:1978
由于此错误,Codeigniter 不发送电子邮件。
我的电子邮件代码:
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'smtp.gmail.com',
'smtp_port' => 587,
'smtp_crypto' => 'tls',
'smtp_user' => 'asd@gmail.com',
'smtp_pass' => 'asd',
'mailtype' => 'html',
'charset' => 'utf-8'
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('asd@gmail.com', 'asd');
$this->email->to($asd);
$this->email->subject($asd);
$this->email->message($asd);
$this->email->send();
Run Code Online (Sandbox Code Playgroud) 我正在编写一个小的 python 脚本来发送电子邮件,但我的代码甚至无法通过 smtp 连接。我正在使用以下代码,但我从未看到“已连接”。此外,我没有看到抛出异常,所以我认为它挂在某些东西上。
import os
import platform
import smtplib
#Define our SMTP server. We use gmail. Try to connect.
try:
server = smtplib.SMTP()
print "Defined server"
server.connect("smtp.gmail.com",465)
print "Connected"
server.ehlo()
server.starttls()
server.ehlo()
print "Complete Initiation"
except Exception, R:
print R
Run Code Online (Sandbox Code Playgroud) 0
我正在尝试从 Java 连接到邮件服务器。我已经能够使用相同的代码从 Java 成功连接到许多邮件服务器,包括 Gmail、Rackspace、GoDaddy 等,但是无论我尝试什么设置,这个服务器都不起作用。
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.host", this.outgoingHost);
props.put("mail.smtp.port", 587);
props.put("mail.smtp.ssl.trust", this.outgoingHost);
session = Session.getInstance(props, new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
Run Code Online (Sandbox Code Playgroud)
这失败了,javax.mail.MessagingException:无法将套接字转换为 TLS;嵌套异常是:javax.net.ssl.SSLException:无法识别的 SSL 消息,纯文本连接?
我也试过,
props.put("mail.smtp.host", this.outgoingHost);
props.put("mail.smtp.port", 587);
props.put("mail.smtp.socketFactory.port", 587);
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.ssl.trust", this.outgoingHost);
session = Session.getInstance(props, new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
Run Code Online (Sandbox Code Playgroud)
这失败了, javax.mail.SendFailedException: Invalid Addresses; 嵌套异常是:com.sun.mail.smtp.SMTPAddressFailedException:在端口 587 上提交邮件需要 550 SMTP AUTH
我也尝试过端口 465,但它超时。
我能够使用来自 …
正如标题所说,"System :: Net :: Mail :: SmtpClient"需要将'SmtpClient :: EnableSsl'设置为true的端口是什么?
该上的文档EnableSsl
属性说的替代连接方法的默认端口是465,但没有提到什么它所使用的连接类型不支持.
编辑 - 如果它有所不同,我在这个例子中连接到Gmail,但欢迎通用答案.
我用Verizon和Gmail试过这个.两台服务器都拒绝认证 Gmail通过电子邮件通知我它拒绝登录尝试,因为连接没有使用"现代安全".
我想知道如何使用这个日志记录处理程序的现代安全性.
logging.handlers.SMTPHandler(mailhost=('', 25),
fromaddr='',
toaddrs='',
subject='',
credentials=('username','password'),
secure=())
Run Code Online (Sandbox Code Playgroud) 我已经检查了我的wamp服务器是否使用了openssl并且检查了它.但是我的代码有什么问题?
$mail = new PHPMailer(true);
$body = 'THIS IS YOUR USERNAME:'.$row['username'].' PASSWORD: '.$row['password'].'\n PLEASE DELETE THIS MESSAGE AFTER YOU READ THIS';
$mail->SMTPDebug = 1;
$mail->IsSMTP(); // tell the class to use SMTP
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Port = 587; // set the SMTP server port
$mail->SMTPSecure = 'tsl';
$mail->Host = 'smtp.gmail.com';
$mail->Username = "dan.villarea22@gmail.com"; // SMTP server username
$mail->Password = "password"; // SMTP server password
$mail->AddReplyTo("system@dvts.com","ADMIN");
$mail->From = "system@dvts.com";
$mail->FromName = "SYSTEM";
$to = "dan.villareal22@gmail.com";
$mail->AddAddress($to);
$mail->Subject …
Run Code Online (Sandbox Code Playgroud) 我没有使用python发送电子邮件的经验,并且我一直在做一些研究,看来您需要安装一些服务器。他们没有从一开始就说明如何做,我很困惑,有人可以告诉我怎么做吗?
我正在使用Windows 10和python 3.2.2
smtp ×5
email ×4
python ×3
amazon-ec2 ×1
amazon-ses ×1
codeigniter ×1
jakarta-mail ×1
java ×1
logging ×1
openssl ×1
php ×1
phpmailer ×1
pop3 ×1
port ×1
python-3.x ×1
rfc ×1
smtpclient ×1
spam ×1
xampp ×1