Skip to content

Commit

Permalink
[joomla#29417] sendMail automatically adds sender as replyTo. Thanks …
Browse files Browse the repository at this point in the history
…Roberto.
  • Loading branch information
dextercowley committed Mar 29, 2013
1 parent 986bb28 commit 316710e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions installation/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ $ -> Language fix or change

28-Mar-2013 Jean-Marie Simonet
# *Multilanguage 2.5: SIngle article display does not filter correctly author contact per language.
# [#29417] sendMail automatically adds sender as replyTo. Thanks Roberto.

24-Mar-2013 Michael Babker
# [#28978] Smart search (com_finder) - problem when using "Allow Empty Search". Thanks Valentin
Expand Down
5 changes: 4 additions & 1 deletion libraries/joomla/mail/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ public function useSMTP($auth = null, $host = null, $user = null, $pass = null,
public function sendMail($from, $fromName, $recipient, $subject, $body, $mode = false, $cc = null, $bcc = null, $attachment = null,
$replyTo = null, $replyToName = null)
{
$this->setSender(array($from, $fromName));
$this->setSubject($subject);
$this->setBody($body);

Expand Down Expand Up @@ -447,6 +446,10 @@ public function sendMail($from, $fromName, $recipient, $subject, $body, $mode =
$this->addReplyTo(array($replyTo, $replyToName));
}

// Add sender to replyTo only if no replyTo received
$autoReplyTo = (empty($this->ReplyTo)) ? true : false;
$this->setSender(array($from, $fromName, $autoReplyTo));

return $this->Send();
}

Expand Down

0 comments on commit 316710e

Please sign in to comment.