Reputation: 5
I'm running Laravel 5.5 and when i try to send email i got Swift_TransportException Expected response code 250 but got code "", with message "".
I'm on localhost and i use Mailtrap to catch outgoing emails it was working perfect with the same settings but after a while i got that exception.
what weird is when i change my IP using a vpn it works and when i disable it it won't
i contact their support and asked if my IP is banned and they say no
So anyone can help me out i'm really confused Thank you in advance.
PS (I've already read most of similar topics here but none of them has same problem)
Upvotes: 0
Views: 2939
Reputation: 3608
Laravel 5.5 using SwiftMailer 6.0 and this is the reason why mail transport isn't working. Swift_Transport_MailTransport(which you are trying to use) was removed from Swift Mailer 6.0 that's why you need to use SMTP transport instead.
Upvotes: 1
Reputation: 170
This has started happening after upgrading to 5.5 to anyone who was using localhost with Mailtrap, Mailhog, etc. It worked for me once I got explicit with the local IP and switched to smtp:
MAIL_DRIVER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
I assumed you were using a localhost mail service, since you are actually using Mailtrap externally I'm not sure anymore, but I was receiving the exact same error on localhost until switching the IP and transfer protocol.
Upvotes: 1