mrxlc's avatar
Level 1

Mails in lumen??

Hey guys I'm trying to send an email with lumen but I have not succeeded, anyone have experience with this?

0 likes
1 reply
bobbybouwmann's avatar
Level 88

You need to add it by your self. The following steps should do it

// Require the mail package
composer require illuminate/mail

// Next you need to register the mailer in bootstrap/app.php
$app->register('App\Providers\AppServiceProvider');
$app->withFacades();

// You can now send emails using the Mail facade
Mail::raw('Raw string email', function($msg) { $msg->to(['[email protected]']); $msg->from(['[email protected]']); });

Note: I did this out of my head so you might need to tweak it a bit, but this is the basic idea

Please or to participate in this conversation.