Skip to content

Commit

Permalink
Fixed mail transport when not specified in scheduler constructor
Browse files Browse the repository at this point in the history
Mails will fail if no transport is defined on scheduler constructor.

The `getEmailConfig` will default the transport to Sendmail.
  • Loading branch information
peppeocchi committed Jan 13, 2018
1 parent dd1fe22 commit 57eb8c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GO/Traits/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ public function getEmailConfig()
*/
private function sendToEmails(array $files)
{
$mailer = new \Swift_Mailer($this->emailConfig['transport']);

$config = $this->getEmailConfig();

$mailer = new \Swift_Mailer($config['transport']);

$message = (new \Swift_Message())
->setSubject($config['subject'])
->setFrom($config['from'])
Expand Down

0 comments on commit 57eb8c6

Please sign in to comment.