stream_socket_enable_crypto():peer证书cn =`< hostName>'没有匹配预期的cn =`smtp-relay.sendinblue.com'

发布于 2025-02-10 22:08:41 字数 1061 浏览 0 评论 0原文

我在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

苏佲洛 2025-02-17 22:08:41

此错误是由于服务器配置引起的。实时服务器配置为限制外部邮件服务器的传出电子邮件。

如果您在实时服务器中使用WHM/CPANEL,

  1. 请登录WHM面板并搜索SMTP并选择SMTP限制。
  2. 单击禁用按钮。

如果您使用的是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,

  1. Login to WHM panel and search for smtp and select SMTP restriction.
    enter image description here
  2. Click Disable Button.
    enter image description here

If you are using any other servers like AWS, DigitalOcean, Google Cloud or any other provider and the configuration depends upon the server.

冧九 2025-02-17 22:08:41

在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' esperado

When trying to send a test email using the last version of prestashop.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文