I keep on getting the following error when I try to send email using laravel - 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

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.

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?

fix Swift_TransportException error in laravel 5.4

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

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!

Send mail in laravel 5x (xampp, php 7, windows, local)

i'm doing sendmail using laravel , but error
i'm try
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=abcd#gmail.com
MAIL_PASSWORD=******
MAIL_ENCRYPTION=tls
but eror
stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Help me fix.
Ensure you're using the correct port number. "465" worked for me.
Also ensure you have correctly configured your gmail account as such.
Go to your Gmail account, perform following modification:
Go to Settings > Protocols > SMTP and select "Delivery of Email" tab
Enter "smtp.gmail.com" in the Remote Host name field.
Enter "465" as the port number.
Check "Server requires authentication".
Enter your Google Mail address in the Username field.
Enter your Google Mail password in the password field.
Check mark "Use SSL"
Save all changes.

Resources