I am using laravel 5 for sending mail using google smtp. in my env file i set
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME={user}
MAIL_PASSWORD={pass}
and in my route
get('sendemail', function () {
$data = array(
'name' => "Learning Laravel",
);
Mail::send('emails.welcome', $data, function ($message) {
$message->from('alam.ifta@gmail.com', 'Learning Laravel');
$message->to('ifta123@gmail.com','Bappa')->subject('Learning Laravel test email');
});
return "Your email has been sent successfully";
});
it send email successfully, but in my inbox i see that the sender is not alam.ifta@gmail.com but from that account which i use in .env file. Where is the problem. Thank you.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1fDzDLJ
via IFTTT
Aucun commentaire:
Enregistrer un commentaire