sending mail to mailtrap.io

Viewed 10306

I am using Laravel 5.1 I made a contact page in my application. So users can send an email. Here I have used mailtrap.io It works when I have created. I mean there was no problem to send mail to mailtrap.io

But today, when I was checking this again, It shows me this error.

Swift_TransportException in StreamBuffer.php line 268: 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]

I have checked my .env file with mailtrap.io setting. everything is ok. Here is my .env file setting

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=25
MAIL_USERNAME=[username]
MAIL_PASSWORD=[password]
MAIL_ENCRYPTION=tls

Anyone please help me?

2 Answers

Update your composer by giving

composer update

and run your application.

Related