I have my own smtp host , i can receive email on my outlook but unable to receive on gmail and hotmail servers.
try {
\Config::set('mail.username', env('MAIL_USERNAME_GLU'));
\Config::set('mail.password', env('MAIL_PASSWORD_GLU'));
\Config::set('mail.host', env('MAIL_HOST_GLU'));
\Config::set('mail.port', env('MAIL_PORT_GLU'));
\Config::set('mail.ssl', env('MAIL_PORT_GLU'));
// \Config::set('mail.encryption', 'tls');
Mail::to($data['email'])->cc(env('MAIL_CC_GLU'))->send(new GluRmaNotification($data));
return ["message" => "Email sent successfully"];
} catch (\Exception $e) {
return ['message' => $e->getMessage()];
}
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2TCJqsL
via IFTTT
Aucun commentaire:
Enregistrer un commentaire