PHP 7 次升级后 OwnCloud 电子邮件通知发送错误
OwnCloud Email Notification Send Error after PHP 7 Upgrade
更新到 PHP 7.0 后,我无法发送成功的测试电子邮件。
在 data/owncloud.log 中发现一个日志类似于:
{"reqId":"XXXXXXX","level":3,"time":"2018-02-19T02:56:55+00:00","remoteAddr":"8.8.8.8","user":"XXX","app":"PHP","method":"POST","url":"\/index.php\/settings\/admin\/mailtest","message":"Use of undefined constant INTL_IDNA_VARIANT_UTS46 - assumed 'INTL_IDNA_VARIANT_UTS46' at \/home\/user\/public_html\/owncloud\/lib\/private\/Mail\/Mailer.php#135"}
我所有的 SMTP 设置都是正确的。从 PHP 5.6 更新到 PHP 7.0 后,还有其他人遇到过这个问题吗?
CentOS 6.9,PHP7.0,WHM/cPanel 与 EA4
找到这两篇文章:
http://php.net/manual/en/function.idn-to-ascii.php
https://github.com/nextcloud/activity/issues/239
能够通过更换解决我的问题:
INTL_IDNA_VARIANT_UTS46
和
INTL_IDNA_VARIANT_2003
在
lib/private/Mail/Mailer.php - Line 135
lib/private/Mail/Message.php - Line 60
lib/private/Mail/Message.php - Line 64
希望这对处于类似情况的其他人有所帮助!
更新到 PHP 7.0 后,我无法发送成功的测试电子邮件。
在 data/owncloud.log 中发现一个日志类似于:
{"reqId":"XXXXXXX","level":3,"time":"2018-02-19T02:56:55+00:00","remoteAddr":"8.8.8.8","user":"XXX","app":"PHP","method":"POST","url":"\/index.php\/settings\/admin\/mailtest","message":"Use of undefined constant INTL_IDNA_VARIANT_UTS46 - assumed 'INTL_IDNA_VARIANT_UTS46' at \/home\/user\/public_html\/owncloud\/lib\/private\/Mail\/Mailer.php#135"}
我所有的 SMTP 设置都是正确的。从 PHP 5.6 更新到 PHP 7.0 后,还有其他人遇到过这个问题吗?
CentOS 6.9,PHP7.0,WHM/cPanel 与 EA4
找到这两篇文章:
http://php.net/manual/en/function.idn-to-ascii.php
https://github.com/nextcloud/activity/issues/239
能够通过更换解决我的问题:
INTL_IDNA_VARIANT_UTS46
和
INTL_IDNA_VARIANT_2003
在
lib/private/Mail/Mailer.php - Line 135
lib/private/Mail/Message.php - Line 60
lib/private/Mail/Message.php - Line 64
希望这对处于类似情况的其他人有所帮助!