当 Subject 标头经过 MIME 编码和折叠mail()
时会导致 PHP 警告:
<?php
$mime_subject = "=?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=\r\n =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=";
mail( "name@domain.com", $mime_subject , "Hallo");
=>mail(): Bad parameters to mail() function, mail not sent.
主题行是 RFC2047(第 8 节)中的示例之一。它被折叠成两行,mail()
不喜欢它。由于它在其他主机上运行良好,我怀疑配置错误。但那会是哪一个呢?
PHP 是版本 5.4.0
有任何想法吗?
编辑:
有关 php 配置的更多信息:
'./configure' '--prefix=/home/www/PHP/php-5.4.0' '--with-openssl'
'--with-zlib-dir=/usr/lib/' '--with-jpeg-dir=/usr/lib/' '--with-mysql'
'--enable-fastcgi' '--with-informix=/opt/informix'
'--with-oci8=shared,instantclient,/opt/oracleclient/instantclient,10.2'
'--enable-pcntl' '--with-gettext' '--with-ldap' '--with-curl'
'--with-gd' '--with-freetype-dir=/usr/include/freetype2/' '--with-dom'
'--enable-bcmath' '--enable-soap' '--enable-mbstring'
'--with-mcrypt=shared,/usr/local/libmcrypt' '--enable-pdo'
'--with-pdo-mysql' '--enable-zip' '--with-imap' '--with-kerberos'
'--with-imap-ssl' '--with-ldap-sasl' '--with-icu-dir=/usr' '--enable-intl'
mail.add_x_header Off Off
mail.force_extra_parameters no value no value
mail.log no value no value
sendmail_from no value no value
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
SMTP localhost localhost
smtp_port 25 25
mailparse version 2.1.6