I am sending an email in laravel like this:
Mail::send('email.email_view', [] , function($message) {
$message->to('email@gmail.com', 'Receiver Name')
->subject('TTTTTT');
});
The view "email.email_view" only contains this:
test this
What happens is that the email gets sent and I receive it in the inbox, but still it throws this exception:
local.ERROR: Connection to tcp://mail.myserver.net:2525 Timed Out {"exception":"[object] (Swift_TransportException(code: 0): Connection to tcp://mail.myserver.net:2525 Timed Out at /home/public_html/test/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:473, Swift_IoException(code: 0): Connection to tcp://mail.myserver.net:2525 Timed Out at /home/public_html/test/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:166) [stacktrace]
If you need the (stacktrace) tell me where to put it online for you guys, I understand there are online tools for it?.
Why does this happen? How to prevent sending emails if an exception is thrown through the process?