Skip to content

sendMail automatically adds sender as replyTo #1564

merged 1 commit into from Oct 4, 2012

4 participants

Joomla! member

Reference Tracker ID:

Please notice me if accepted to apply the same fix to CMS.

drmmr763 commented Oct 2, 2012

+1 This is a simple change that will fix tons of issues. Many servers (like mine) require an at-domain sender email, but this causes problems when you want to reply to a site sender from an emailed form. Being able to set the header here is perfect, you get the proper send address, and a useful reply to address.

pasamio commented Oct 4, 2012

So I dislike adding code that relies upon the internal structure of PHPMailer when we could add a simple $autoReplyTo = false on roughly line 457 and then add an else statement with $autoReplyTo = true. Alternatively we can flip the boolean here and put the $autoReplyTo = false inside the existing two if clauses.


+1 Nice work Roberto... causes some of my clients huge issues.

Joomla! member

@pasamio I thought about the same searching how to fix it.

I finally used this because JMail already extends PHPMailer and this approach allows you to use a $mailer->replyTo() and then a $mailer->sendMail() without the replyTo info. The mail will use the desired replyTo inserted because it checks its existence globally .

If we set the autoReply only based on the arguments received by sendMail that will stop working. So you will be creating another bug.

@pasamio pasamio merged commit 252cf7d into joomla:staging Oct 4, 2012
pasamio commented Oct 4, 2012

Fair enough, merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.