Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[#29417] sendMail automatically adds sender as replyTo

  • Loading branch information...
commit 0d3d005a62e87708a852f9f073532963b44d55bf 1 parent 7cf2953
@phproberto authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 libraries/joomla/mail/mail.php
View
5 libraries/joomla/mail/mail.php
@@ -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);
@@ -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();
}
Please sign in to comment.
Something went wrong with that request. Please try again.