Error trying to send email with Symfony Mailer - windows

How do you configure Symfony Mailer? I'm swapping Swiftmailer to Symfony Mailer because Swiftmailer is now deprecated. However, I haven't been able to send a single email with Symfony Mailer yet. Swiftmailer always works and the emails are caught by smtp4dev.
Platform:
Windows 10
Symfony 4.4
smtp4dev listening on port 25
mailer.yaml
framework:
mailer:
dsn: 'smtp://localhost'
Error message:
stream_socket_enable_crypto(): SSL: An established connection was aborted by the software in your host machine.

Related

EC-2 suddenly stopped sending smtp.gmail.com mail - connection timeout

Im running a Laravel 6 app on AWC EC-2 instance and have it configured to send mail via Gmail SMTP. Has worked perfect for nearly 2 years. Approx 1-1.5 days ago, the email function started throwing the Connection timed out error.
I tried switching ports, and changing TLS to SSL and no change.
Ive read dozens of threads with the same problem - but no help. Most suggest changing from driver smtp to sendmail - but that breaks all my email-send code.
I tried to telnet smtp.gmail.com 587 from the command line - and get Host is unreachable. There has been NO change to the code, config or setup recently.
My thoughts right now, are either:
AWS have blocked my smtp port,
Google has blocked my IP from sending mail,
My server MAY have reached a limit of some sort (but thought it will un-suspend in 24hrs if the case)
I am not sure HOW or WHERE to find that answer, or if there is another possible problem/solution here. I only have Basic support with AWS - so cant raise a standard tech support q.
Any suggestions would be greatly appreciated.
With thanks - James (Image of error and env below).

Laravel WebSockets - deployment - fails to connect the websocket

I am trying to deploy my laravel project with websockets built on Beyond Code's package.
My server is on AWS and i'm using WHM.
on the cPanel's terminal i'm running the line php artisan websockets:serve
and i get the result Starting the WebSocket server on port 6001...
when i'm loading the page with the websocket's connection sometimes i get the error failed: Error during WebSocket handshake: Unexpected response code: 200
and sometimes i get the error failed: WebSocket is closed before the connection is established.
On AWS EC2's Security Groups i allowed the Custom TCP port 6001 and 6002
Any suggestions to fix it?
Maybe a good deployment tutorial for Laravel WebSockets?
I'm looking for answers all over the internet and i get nothing useful.

Connection could not be established with host laravel 5.4?

i am using virtual host but phpmyadmin is also pointed to virtual host ip and working perfectly
when i register a account on my laravel project i am getting following error .
Connection could not be established with host [No connection could be
made because the target machine actively refused it.
#10061]
in my logs
#10061] in C:\xampp\htdocs\upload\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\StreamBuffer.php:268
Stack trace:
This error can be caused by having the wrong values configured for MAIL_PORT, MAIL_ENCRYPTION, and occasionally MAIL_HOST.
swiftmailer is the library that sends email. You're getting the error when you register and Laravel tries to send an email.
"...the target machine actively refused..." means that the host resolved successfully, but the other computer either has a firewall blocking the port or no process is listening on that port.
Your mailer service should tell you what port to use in their documentation. If using MAIL_DRIVER=smtp and MAIL_ENCRYPTION=tls, typically this will be port 587, 465, or 25.

CodeIgniter email class behind proxy server

Email class in codeigniter is awesome but not if you are behind proxy server. I just make a mechanism to send an email to someone through my reservation application with codeigniter. I test it in my local machine with localhost address and it works. But when i move my code to different machine with some reverse proxy working, it is fail to send. I get some error message as below
A PHP Error was encountered
Severity: Warning
Message: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (No connection could be made because the target machine actively refused it. )
Filename: libraries/myemail.php
Line Number: 29
Just remember that i can send the email before, with localhost address. I implement this for creating connection through proxy server in my college. Any suggestion?

"Server response: 451 451 Temporary local - please try later" when sending email using Mailgun, Laravel and VirtualBox

I am getting the error "Server response: 451 451 Temporary local problem - please try later" when sending password reminder emails via Laravel and Mailgun. I am running Laravel on VirtualBox.
I set up VirtualBox using Vagrant, would this have made a difference?
If I change the SMTP settings to my own host it works absolutely fine. Is there an issue with using Mailgun on a Virtual machine?
Update
I can send to Gmail addresses without any problems, however, they apparently are neither being blocked or allowed.
This is the error I get:
Failed: support#mydomain.com → me#anotherdomain.com Server response: 550 550
Verification failed for <bounce+ad0324.1a1312-me=anotherdomain.com#mydomain.com>
No Such User Here Sender verify failed
The error "451 Temporary local problem" comes from the actual mail server you are connecting to.
Typically, 451 errors are due to the receiving server rejecting your email. This can happen for a number of reasons but most likely is due to the recipients server being overloaded with messages. It can also mean that the recipients server has grey-listed the IP, and therefore delays the message until it can verify that the sending server is not trying to send spam. The receiving server may be offline as well.
Since this error message is so vague, you'll need to get more information from the recipient. I'd suggest waiting a few hours and try to send the email again.
It doesn't have to do with your Laravel installation or running with Virtualbox, further more because you tested with other SMTP settings.

Resources