We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6c17304 + 8d468e2 commit 4e9311dCopy full SHA for 4e9311d
src/Shell/Task/QueueEmailTask.php
@@ -73,12 +73,16 @@ public function run(array $data, $jobId) {
73
return false;
74
}
75
76
+ if (!isset($data['transport'])) {
77
+ $this->err('Queue Email task needs a transport to be set to actually send the email.');
78
+ return false;
79
+ }
80
+
81
/** @var \Cake\Mailer\Email $email */
82
$email = $data['settings'];
83
if (is_object($email) && $email instanceof Email) {
84
try {
- $transportClassNames = $email->configuredTransport();
- $result = $email->transport($transportClassNames[0])->send();
85
+ $result = $email->setTransport($data['transport'])->send();
86
87
if (!isset($config['log']) || !empty($config['logTrace']) && $config['logTrace'] === true) {
88
$config['log'] = 'email_trace';
0 commit comments