On my shared host, PHP mail function
works fine, but I can't send email using Laravel Mail::send()
.
when config/mail.php
driver
field is set to smtp
, Mail::send()
returns false
when the field is set to mail
the method returns true
but the email isn't sent.
How can I debug this?
I don't know why, but when requests start with WWW
, the Laravel Mail::send()
works but with requests without WWW
it fails so I just forced WWW
using .htacess
301 redirects
.