php - 带有后缀的phpmailer中的SMTP Connect()
问题描述
尝试发送phpmailer
返回此错误的电子邮件:
2019-09-09 16:48:39 服务器-> 客户端:220 primarydomain.mx ESMTP 后缀(Ubuntu) 2019-09-09 16:48:39 客户端-> 服务器:EHLO www.subdomain.mx 2019-09-09 16:48:39 服务器-> 客户端:250-primarydomain.mx 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS 250-AUTH 普通登录 250-AUTH=PLAIN 登录 250-ENHANCEDSTATUSCODES 250-8BITMIME 2 DSN 250 SMTPUTF8 2019-09-09 16:48:39 客户端 -> 服务器:STARTTLS 2019-09-09 16:48:39 服务器 -> 客户端:220 2.0.0 准备启动 TLS 2019-09-09 16:48 :39 错误 SMTP:无法连接服务器 SMTP。2019-09-09 16:48:39 客户端 -> 服务器:退出 2019-09-09 16:48:39 服务器 -> 客户端:f5�|�+x�]?�M캅<������ ��9J����!��D(��"�n�6�m�� ��C��G0�O�vjdK@��&�z�����VŔ��"��� ����!C�Qf�yE-��M�YWrp8Dʕ������\N<��L�8�LsE�WZ�M�=��1c�@�=6�h,” $��rμ#��D����t�"
��O�[�%�� ���^�p���E��Y�8,��P쓞C B�Sd��:84$<����|E:�_��nR��iO��e��7듣6��Ρ�(��N�,����P;���]f���{SS���"��<��� 2019-09-09 16:48:39 SMTP ERROR: QUIT command failed: f5�|�+x�]?�M캅<�������9J���!��D(��"�n�6�m�� ��C��G0�O�vjdK@��&�z�����VŔ��"����� �!C�Qf�yE-��M�YWrp8Dʕ������\N<���L�8�LsE�WZ�M�=��1c�@�=6�h,�$��rμ#��D����t�"f���ʹ٢3��y��:Z�>&�u�?
��O�[�%������^�p���E��Y�8,��P쓞C B�Sd��:84$<����|E:�_�� nR��iO��e��7듣6��P�(��N�,����P;����]f���{SS����"��<���� 2019- 09-09 16:48:39 SMTP Connect() falló. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting SMTP Connect() falló. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
这是我的postix
全局设置,有帮助吗?
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = primarydomain.mx
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, primarydomain.mx, localhost.mx, , localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtp_tls_security_level = may
allow_percent_hack = no
PD:我可以毫无问题地使用我的电子邮件Thunderbird
或Outlook
客户,这只是在我尝试使用phpmailer
发送电子邮件时发生的。
解决方案
推荐阅读
- c# - 如何使用 .runsettings 部署其他测试文件?
- r - 如何让 ggplot2 geom_contour 复制基本图形轮廓
- java - Apache Flink CEP如何根据事件值传递时间窗口?
- python - 两个 python 脚本之间的大数据传输
- c# - Visual Studio 在错误的位置查找 web.config
- macos - Mac OS 上的 Docker /usr/src/app 路径
- r - 将分组数据发送到 arima/lm 并在 R 中重建原始列的最佳方法?
- ios - iOS中的电话号码
- asp.net-mvc - ASP.NET JavaScriptServices v2 模板 - 添加 Azure B2C 身份验证静态文件
- javascript - 创建新对象 Processing.js - 随机球程序