PHPMailer:收件人地址被拒绝:您不能使用与您的登录名不同的发件人地址发送电子邮件

PHPMailer: Recipient address rejected: You cannot send email using FROM address different than your login

我在将电子邮件发送到 Mantis 时遇到问题。我该如何解决这个问题?

日志:

2016-06-19 10:38 CEST mail message #165 queued
2016-06-19 10:38 CEST mail Password reset for user @U11 sent to mail@mail.com
2016-06-19 10:38 CEST mail Processing e-mail queue (1 messages)
2016-06-19 10:38 CEST mail Sending message #165 queued on 2016-06-19 10:38 CEST
2016-06-19 10:38 CEST mail ERROR: Message could not be sent - SMTP Error: The following recipients failed: mail@mail.com<p>SMTP server error: 5.7.1 <mail@mail.com>: Recipient address rejected: You cannot send email using FROM address different than your login. 773d.576659f9.52d4c.0

配置:

$g_allow_signup = ON;
$g_enable_email_notification = ON;
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'xx.pl';
$g_smtp_username = 'xx@xx.pl';
$g_smtp_password = 'yy';
$g_smtp_connection_mode = 'tls';
$g_smtp_port = 587;
$g_from_email = 'xx@xx.pl';
$g_from_name = 'Xx';
$g_max_lost_password_in_progress_count = 100;
$g_email_send_using_cronjob = OFF;
$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT | LOG_FILTERING | LOG_AJAX;
$g_log_destination = 'file:/mantis.log';

就像它说的那样 - 它不允许使用与您的登录名不同的发件人地址发送。这取决于您的 ISP,但请注意,这并不罕见 - gmail 也是如此,尽管它允许您预定义别名作为地址的替代。

我刚刚将 $g_return_path_email 添加到配置文件,现在可以使用了