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.
Related
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?
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
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!
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]'
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.