fix Swift_TransportException error in laravel 5.4 - laravel

I am trying to make reset Password in laravel 5.4. In env file I have changed
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=*****************
MAIL_PASSWORD=****************
MAIL_ENCRYPTION=null
Error shows
Swift_TransportException
Connection could not be established with host mailtrap.io [A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
10060]
How can I fix it? I use mailtrap.io
Thanks in advance

Related

smtp Connection could not be established in postman - laravel

I am trying to make an api authentication system with email verification but i get this error in postman:
"message": "Connection could not be established with host
smtp.mailtrap.io :stream_socket_client(): unable to connect to
tcp://smtp.mailtrap.io:25 (A connection attempt failed because the
connected party did not properly respond after a period of time, or
established connection failed because connected host has failed to
respond.\r\n)",
This is my env file:
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=25 (and 587 , 2525)
MAIL_USERNAME=3aeeeeeeeeee87a
MAIL_PASSWORD=2104eeeeeeeeee9
MAIL_ENCRYPTION=TLS
MAIL_FROM_ADDRESS=test#gmail.com
MAIL_FROM_NAME="${APP_NAME}"
I have run:
php artisan config:clear
php artisan cache:clear
Restart XAMPP
mail.php values are as same as .env file but still get the same error, how can I solve this?
You must be entering the email in the wrong format(in input), set the validation of the email, or enter the email in a proper format and then try it will work.

I keep on getting the following error when I try to send email using laravel

I keep on getting the following error when I try to send email on live server.
Does anybody have any idea how to solve this?
Error
Connection could not be established with host smtp.mailtrap.io :stream_socket_client(): unable to connect to smtp.mailtrap.io:2525 (Connection refused)
https://flareapp.io/share/x5MqzN5k
Check that you have already created an account with mailtrap.io and that you have access.
Second configure your .env file and enter the following parameters as below.
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=81UserIDd47b***
MAIL_PASSWORD=36ba146c85*****
MAIL_ENCRYPTION=null
Remplacer le MAIL_USERNAME et le
MAIL_PASSWORD par les accès que vous avez obtenus chez mailtrap.io

Unable to send email using swiftmailer library. Getting Expected response code 250 but got code "550". How to fix this?

My laravel application isn't working with mijn domain smtp mail.
SMTP credentials
These are the credentials for my smtp mail.
This is my .env file
MAIL_DRIVER=smtp
MAIL_HOST=smtp.transip.email
MAIL_PORT=465
MAIL_USERNAME=noreply#schouwenduivelandinbeeld.nl
MAIL_PASSWORD=Hallootjes123
MAIL_ENCRYPTION=ssl
I get this error:
The error i get
What am i doing wrong?

Laravel 5.3 mail settings being ignored

I have amended the .env file with the correct setting for my mail server:
MAIL_DRIVER=smtp
MAIL_HOST=***********.secureserver.net
MAIL_PORT=465
MAIL_USERNAME=*************
MAIL_PASSWORD=*************
MAIL_ENCRYPTION=null
but when I try it out via the forgot password I always get:
Swift_TransportException in StreamBuffer.php line 269:
Connection could not be established with host mailtrap.io [Connection refused #111]
I have searched to find out another instance of mailtrap.io but can only find it in the example of env.
Thanks to everyone. It seems that it was a fault in my ftp client (Fileziller). It was reporting that it had uploaded the file OK but indeed it had not. When I went on the server and looked at the datetime of the record is was wrong.
I erased it and reuploaded and all was well.
A lesson for the future!

Laravel 5.2 swiftmailer error

I keep getting this error, despite trying all I could in the .env file. I even hardcoded the values in the config/mail file (removed them from the .env file), and it still gave the same error. I'm using a sandbox domain, with verified email addresses. The sandbox is active, and so are the email addresses.
PHP warning: stream_socket_client(): unable to connect to tcp://smtp.mailgun.org:587 (No connection could be made because the target machine actively refused it.
) in C:\xampp\htdocs\laravelproject\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\StreamBuffer.php on line 267
Swift_TransportException with message 'Connection could not be established with host smtp.mailgun.org [No connection could be made because the target machine actively refused it.
#10061]'

Resources