PHP 7升级后,OwnCloud电子邮件通知发送错误

时间:2018-02-20 01:54:49

标签: php centos php-7 owncloud

在更新到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,PHP 7.0,带EA4的WHM / cPanel

1 个答案:

答案 0 :(得分:0)

找到这两篇文章:

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

希望这可以帮助处于类似情况的其他人!