stream_socket_enable_crypto():peer证书cn =`< hostName>'没有匹配预期的cn =`smtp-relay.sendinblue.com'
我在Laravel 8中的邮件功能在Live Server上部署后,我进行了以下配置。
.env
MAIL_MAILER=smtp
MAIL_HOST=smtp-relay.sendinblue.com
MAIL_PORT=587
MAIL_USERNAME=MAIL
MAIL_PASSWORD=*************
MAIL_ENCRYPTION=tls
config/mail.php
'default' => env('MAIL_MAILER', 'sendmail'),
'mailers' =>
[
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'auth_mode' => env('MAIL_AUTH_MODE'),
],
'sendmail' => [
'transport' => 'sendmail',
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -t -i'),
],
],
我的配置上错了吗?感谢任何建议,谢谢。
注意:一切都可以在本地环境中起作用(窗口10)
I'm working the mail function in Laravel 8 after I deploy on the live server, I have following configuration.
.env
MAIL_MAILER=smtp
MAIL_HOST=smtp-relay.sendinblue.com
MAIL_PORT=587
MAIL_USERNAME=MAIL
MAIL_PASSWORD=*************
MAIL_ENCRYPTION=tls
config/mail.php
'default' => env('MAIL_MAILER', 'sendmail'),
'mailers' =>
[
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'auth_mode' => env('MAIL_AUTH_MODE'),
],
'sendmail' => [
'transport' => 'sendmail',
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -t -i'),
],
],
Am I wrong in my configuration? Any kind of suggestions are appreciated, thank you.
Note: Everything can be work in local environment (Window 10)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此错误是由于服务器配置引起的。实时服务器配置为限制外部邮件服务器的传出电子邮件。
如果您在实时服务器中使用WHM/CPANEL,
如果您使用的是AWS,Digitalocean,Google Cloud或任何其他提供商等其他服务器,并且配置取决于服务器。
This error is due to server configuration. The Live Server is configured to restrict outgoing emails from external mail servers.
If you are using WHM/CPanel in your live server,
If you are using any other servers like AWS, DigitalOcean, Google Cloud or any other provider and the configuration depends upon the server.
在WHM上,转到SMTP限制并选择禁用SMTP限制。
在我的情况下,错误是:
错误:por favor,comprueba tuconfiguración
no se pudo stoperecer laconexiónconel host smtp.gmail.com:stream_socket_client():el certialdo de pares cn =
mydomain.cl'noconcincidiócon el con e el cn =
smtp.gmail.com'eSperado何时尝试使用Prestashop的最后版本发送测试电子邮件。
On WHM, go to SMTP Restrictions and choose Disable SMTP restrictions.
In my case the error was:
Error: Por favor, comprueba tu configuración
No se pudo establecer la conexión con el host smtp.gmail.com :stream_socket_client(): El certificado de pares CN=
mydomain.cl' no coincidió con el CN=
smtp.gmail.com' esperadoWhen trying to send a test email using the last version of prestashop.