我使用 woocommerce 和其他插件来允许用户添加产品。当用户添加新产品时,服务器无法发送通知,从而出现此错误:
Fatal error: Uncaught phpmailerException:
Invalid address: in /srv/users/serverpilot/apps/xxxx/public/wp-includes/class-phpmailer.php:946
Stack trace:
#0 /srv/users/serverpilot/apps/wordpressthm/public/wp-includes/pluggable.php(352): PHPMailer->setFrom('', 'OneSocial', false)
#1 /srv/users/serverpilot/apps/xxxx/public/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php(466): wp_mail('test@hot...', '[Test Product...', '<!DOCTYPE html>...', Array, Array)
#2 /srv/users/serverpilot/apps/xxxx/public/wp-content/plugins/wc-vendors/classes/admin/emails/class-wc-notify-admin.php(81): WC_Email->send('test@hot...', '[The Hockey Mov...', '<!DOCTYPE html>...', 'Content-Type: t...', Array)
#3 /srv/users/serverpilot/apps/xxxx/public/wp-content/plugins/wc-vendors/classes/admin/emails/class-emails.php(40): WC_Email_Notify_Admin->trigger('', Object(WP_Post))
#4 /srv/users/serverpilot/apps/xxxx/public/wp-includes/plugin.php(524): WCV_Emails->trigger_new_product('pending' in /srv/users/serverpilot/apps/xxxx/public/wp-includes/class-phpmailer.php on line 946
服务器设置为数字海洋
答案 0 :(得分:0)
答案可在例外中找到。通知的接收者或发件人地址的电子邮件地址无效。