Skip to content

Commit 57eb8c6

Browse files
committed
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.
1 parent dd1fe22 commit 57eb8c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GO/Traits/Mailer.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ public function getEmailConfig()
4242
*/
4343
private function sendToEmails(array $files)
4444
{
45-
$mailer = new \Swift_Mailer($this->emailConfig['transport']);
46-
4745
$config = $this->getEmailConfig();
4846

47+
$mailer = new \Swift_Mailer($config['transport']);
48+
4949
$message = (new \Swift_Message())
5050
->setSubject($config['subject'])
5151
->setFrom($config['from'])

0 commit comments

Comments
 (0)