I have been trying to send emails from my laravel app with mailgun but cant get it to work.
.env
MAIL_DRIVER=mailgun
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
MAIL_USERNAME=(Default SMTP Login from mailgun)
MAIL_PASSWORD=**********
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS= hello@****.*****.me
MAIL_FROM_NAME= Me
MAILGUN_DOMAIN=*****.*****.me
MAILGUN_SECRET=key-10*****************************f
mail.php
return [
'driver' => env('MAIL_DRIVER', 'mailgun'),
'host' => env('MAIL_HOST', '*****.******.me'),
'port' => env('MAIL_PORT', 587),
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@*****.******.me'),
'name' => env('MAIL_FROM_NAME', 'Me'),
'encryption' => env('MAIL_ENCRYPTION', 'ssl'),
'username' => env('postmaster@*****.******.me'),
'password' => env('************'),
'sendmail' => '/usr/sbin/sendmail -bs',
'markdown' => [
'theme' => 'default',
'paths' => [
resource_path('views/vendor/mail'),
],
],
];
services.php
'mailgun' => [
'domain' => env('*****.******.me'),
'secret' => env('key-1******************************f'),
],
Using this url to test
Route::get('/send_test_email', function(){
Mail::raw('Sending emails with Mailgun and Laravel is easy!', function($message)
{
$message->to('finchy70@gmail.com');
});
});
No errors but no emails sent. Also no activity on my mailgun dashboard. All my mailgun DNS settings are verified for my domain.
Can anyone see what I'm doing wrong?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2EMXE4F
via IFTTT
Aucun commentaire:
Enregistrer un commentaire