-
install lumen
composer global require "laravel/lumen-installer=~1.0"
-
Create new lumen service
lumen new mailerapp
(named mailerapp) -
In bootstrap/app.php, uncomment line 81
$app->register(App\Providers\AppServiceProvider::class);
-
In bootstrap/app.php, uncomment line 22
$app->withFacades();
-
In bootstrap/app.php, uncomment line 5
Dotenv::load(__DIR__.'/../');
-
In the terminal require mail
composer require illuminate/mail
(should download version ~5.1)Note: this installs a few other dependencies like swiftmailer
-
Update .env file to have appropriate username/password/etc for MAIL_DRIVER, MAIL_HOST, etc...
-
Add
use Illuminate\Support\Facades\Mail;
at top of file where Mail will be sent from -
Take a look at the '/' route where I am sending out a raw mail string to myself
NOTE: I used the key route to generate a random string that I pasted into my app_key .env because Lumen does not have the key:generate artisan command, but this does not seem to be required.
-
Notifications
You must be signed in to change notification settings - Fork 1
thomasjohnkane/lumen-mail
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Send mail from a Lumen application
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published