From 57eb8c6ce0e17b8a32fee91e3fae7939f7cf62f7 Mon Sep 17 00:00:00 2001 From: Giuseppe Occhipinti Date: Sat, 13 Jan 2018 12:10:26 +0000 Subject: [PATCH] Fixed mail transport when not specified in scheduler constructor Mails will fail if no transport is defined on scheduler constructor. The `getEmailConfig` will default the transport to Sendmail. --- src/GO/Traits/Mailer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GO/Traits/Mailer.php b/src/GO/Traits/Mailer.php index 845eb35..27b009e 100644 --- a/src/GO/Traits/Mailer.php +++ b/src/GO/Traits/Mailer.php @@ -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'])