我有一个托管在 192.168.187.15 的 postfix 服务器,中继位于 192.168.187.17 。我在 192.168.187.16 托管了一个带有批量收件人的 php codeignitor 电子邮件发送应用程序。我将postfix与smtp端口25从192.168.187.16连接到192.168.187.15。当使用批量食谱发送出站电子邮件时,我收到以下错误。
220 mail.mycompany.org ESMTP Postfix
hello: 250-mail.mycompany.org
250-PIPELINING
250-SIZE 22020096
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
from: 250 2.1.0 Ok
to: 250 2.1.5 Ok
to: 250 2.1.5 Ok
to: 250 2.1.5 Ok
to: 250 2.1.5 Ok
to: 250 2.1.5 Ok
to: 250 2.1.5 Ok
to: 250 2.1.5 Ok
to: 250 2.1.5 Ok
to: 250 2.1.5 Ok
to: 250 2.1.5 Ok
to: 250 2.1.5 Ok
to: 250 2.1.5 Ok
to: 250 2.1.5 Ok
to: 250 2.1.5 Ok
to: 250 2.1.5 Ok
to:
The following SMTP error was encountered:
quit: 250 2.1.5 Ok
The following SMTP error was encountered: 250 2.1.5 Ok Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method
但是当我将此应用程序托管到 192.168.187.16 时,它不会给出任何错误。
向批量收件人发送出站电子邮件的后缀配置是什么。
对于从连接到 smtp 服务器的 php 或 codeignitor 应用程序进行批量邮件发送,我最终发现必须在运行 php 应用程序的服务器中更改或编辑两个配置。
For Apache:
Open the Apache configuration file /etc/httpd/conf/httpd.conf
add the below line at the end of the or increase as per your requirement.
Timeout 300
ProxyTimeout 300
之后重新启动apache服务器。
sudo systemctl restart httpd
增加 /etc/php.ini 文件中的 PHP 超时设置。
max_execution_time = 300 # Increase or Update as per requirement in seconds