From address always added to Reply-To even if Reply-To is set

Created on 21 February 2023, over 1 year ago
Updated 30 October 2023, 8 months ago

Problem

The From address is being added to Reply-To if the 'From' parameter is in the parameter array before 'Reply-To', regardless of Reply-To being set. This can cause issues with clients that reject multiple addresses in the Reply-To, in addition to having the wrong Reply-To.

I believe this is due to the function SetFrom in smtp.phpmailer.inc auto-populating the Reply-To. It looks like the code in smtp.mail.inc also attempts to do this on line 145, which should be enough.

Proposed Resolution

I don't have the means to submit a patch, but our solution was to change the call on line 197 in smtp.mail.inc from $mailer->setFrom($from, $from_name); to $mailer->setFrom($from, $from_name, 0); and this fixed our issue.

πŸ› Bug report
Status

RTBC

Version

1.9

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ramzypro

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024