diff --git a/app/config/mail.conf.dist.php b/app/config/mail.conf.dist.php index 7724e931ec..6ba16009a8 100644 --- a/app/config/mail.conf.dist.php +++ b/app/config/mail.conf.dist.php @@ -18,3 +18,4 @@ $platform_email['SMTP_CHARSET'] = 'UTF-8'; $platform_email['SMTP_UNIQUE_SENDER'] = 0; // to send all mails from the same user $platform_email['SMTP_DEBUG'] = 0; // change to 1 to enable smtp debug $platform_email['SMTP_SECURE'] = 'tls'; // if you're using SSL: ssl; or TLS: tls. (only used if SMTP_AUTH==1) +$platform_email['SMTP_UNIQUE_REPLY_TO'] = 0; // to use AWS SMS service, SMTP_UNIQUE_SENDER and this have to be = 1 diff --git a/main/inc/lib/api.lib.php b/main/inc/lib/api.lib.php index 0b71b01de2..99bd983462 100644 --- a/main/inc/lib/api.lib.php +++ b/main/inc/lib/api.lib.php @@ -7783,7 +7783,7 @@ function api_mail_html( $senderEmail = !empty($senderEmail) ? $senderEmail : $defaultEmail; // Reply to first - if (isset($extra_headers['reply_to'])) { + if (isset($extra_headers['reply_to']) && empty($platform_email['SMTP_UNIQUE_REPLY_TO'])) { $mail->AddReplyTo( $extra_headers['reply_to']['mail'], $extra_headers['reply_to']['name']