Skip to content

Commit

Permalink
Add reply-to support (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
novon229 authored and Lidbetter committed Oct 13, 2017
1 parent b5007b2 commit fb8b370
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Transport/SendgridTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function send(Swift_Mime_Message $message, &$failedRecipients = null)
$this->setCc($data, $message);
$this->setBcc($data, $message);
$this->setText($data, $message);
$this->setReplyTo($data, $message);
$this->setAttachment($data, $message);
$this->setSmtpApi($data, $message);
if (version_compare(ClientInterface::VERSION, '6') === 1) {
Expand Down Expand Up @@ -92,6 +93,17 @@ protected function setBcc(&$data, Swift_Mime_Message $message)
$data['bccname'] = array_values($bcc);
}
}
/**
* @param $data
* @param Swift_Mime_Message $message
*/
protected function setReplyTo(&$data, Swift_Mime_Message $message)
{
if ($replyTo = $message->getReplyTo()) {
$data['replyto'] = array_keys($replyTo);
}
}

/**
* Get From Addresses.
*
Expand Down

0 comments on commit fb8b370

Please sign in to comment.