Skip to content

Commit

Permalink
Refactoed MultiMailer
Browse files Browse the repository at this point in the history
  • Loading branch information
vagrant committed Nov 19, 2019
1 parent ebc7a37 commit a25a75e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/MultiMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,8 @@ public function queue(Mailable $mailable)
* @param array
* @return Swift_SmtpTransport
*/
protected static function getSMTPTransport($config)
protected static function getSMTPTransport($config, $provider)
{
$provider = static::getProvider($config['provider']);

$transport = new Swift_SmtpTransport($provider['host'], $provider['port'], $provider['encryption']);
$transport->setUsername($config['username']);
$transport->setPassword($config['pass']);
Expand Down Expand Up @@ -213,7 +211,7 @@ protected static function getSwiftMailer($config, $timeout = null, $frequency =
return new Swift_Mailer($transport);
}

$transport = static::getSMTPTransport($config);
$transport = static::getSMTPTransport($config, $provider);

$swift_mailer = new Swift_Mailer($transport);

Expand Down

0 comments on commit a25a75e

Please sign in to comment.