I am using Laravel 5.2. I am using Mail queue for sending email. Following is email queue syntax.
$mailArr = array();
$mailArr['subject'] = 'testing mail';
$mail_body = 'testing mail';
$mailArr['description'] = $mail_body;
Mail::to($email)->queue(new CustomMail($mailArr));
- If I use "send" instead of "queue" then successfully receiving email.
- Queue emails are going in Job table and attempting 3 times and then it is going in failed_jobs table.
- In failed_jobs table, I am getting error ErrorException: fwrite(): SSL: Broken pipe in vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:231
- I am processing queue with dispatcher and supervisor.
- If I manually hit php artisan queue:work even then email is going but automatically with schedule:run written in cron job, is not working.
So any suggestions please what could be the reason?