Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
Fix rewrite sendFrom
Browse files Browse the repository at this point in the history
  • Loading branch information
kuzmany committed Apr 2, 2019
1 parent c94464d commit 15cd611
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Randomizer/SmtpRandomizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct(IntegrationHelper $integrationHelper)
*
* @throws HostNotExistinCsvRowExpection
*/
public function randomize(RandomSmtpTransport $randomSmtpTransport, \Swift_Mime_Message $message = null)
public function randomize(RandomSmtpTransport $randomSmtpTransport, \Swift_Mime_Message &$message = null)
{
$smtps = $this->smtps;
shuffle($smtps);
Expand Down
4 changes: 2 additions & 2 deletions Swiftmailer/Transport/RandomSmtpTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ public function send(\Swift_Mime_Message $message, &$failedRecipients = null)
*
* @param Swift_Mime_Message $message
*/
private function setRandomSmtpServer(\Swift_Mime_Message $message = null)
private function setRandomSmtpServer(\Swift_Mime_Message &$message = null)
{
$this->logger->info(sprintf('Send by random SMTP server: %s with username %s and sender email %s', $this->getHost(), $this->getUsername(), implode(',', $message ? array_keys($message->getFrom()) : [])));
try {
$this->logger->info(sprintf('Send by random SMTP server: %s with username %s and sender email %s', $this->getHost(), $this->getUsername(), implode(',', $message ? array_keys($message->getFrom()) : [])));
$this->smtpRandomizer->randomize($this, $message);
} catch (\Exception $exception) {
$this->logger->error($exception->getMessage());
Expand Down

0 comments on commit 15cd611

Please sign in to comment.