Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

Commit

Permalink
Merge ea5c170 into 27abd2e
Browse files Browse the repository at this point in the history
  • Loading branch information
red-smeg committed Feb 22, 2019
2 parents 27abd2e + ea5c170 commit f3c19ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Consumer/SwiftMailerConsumer.php
Expand Up @@ -67,6 +67,9 @@ private function sendEmail(MessageInterface $message)
if ($replyTo = $message->getValue('replyTo')) {
$mail->setReplyTo($replyTo);
}
if ($returnPath = $message->getValue('returnPath')) {
$mail->setReturnPath($returnPath);
}

if ($cc = $message->getValue('cc')) {
$mail->setCc($cc);
Expand Down
4 changes: 4 additions & 0 deletions tests/Consumer/SwiftMailerConsumerTest.php
Expand Up @@ -61,6 +61,9 @@ public function testSendEmail()
'replyTo1@mail.fr',
'replyTo2@mail.fr' => 'nameReplyTo2',
],
'returnPath' => [
'email' => 'returnPath@mail.fr',
],
'cc' => [
'cc1@mail.fr',
'cc2@mail.fr' => 'nameCc2',
Expand All @@ -84,6 +87,7 @@ public function testSendEmail()
$mail->expects($this->once())->method('setFrom')->with($this->equalTo(['from@mail.fr' => 'nameFrom']))->willReturnSelf();
$mail->expects($this->once())->method('setTo')->with($this->equalTo(['to1@mail.fr', 'to2@mail.fr' => 'nameTo2']))->willReturnSelf();
$mail->expects($this->once())->method('setReplyTo')->with($this->equalTo(['replyTo1@mail.fr', 'replyTo2@mail.fr' => 'nameReplyTo2']))->willReturnSelf();
$mail->expects($this->once())->method('setReturnPath')->with($this->equalTo(['email' => 'returnPath@mail.fr']))->willReturnSelf();
$mail->expects($this->once())
->method('setCc')
->with($this->equalTo(['cc1@mail.fr', 'cc2@mail.fr' => 'nameCc2']))
Expand Down

0 comments on commit f3c19ae

Please sign in to comment.