You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -217,6 +217,39 @@ class Foo extends Command
217
217
}
218
218
```
219
219
220
+
#### Notifications mail driver
221
+
222
+
In order to send an email notifications, package would check `mail` configuration of your Laravel project.
223
+
If you're using one of supported mail drivers, it would be used for email notifications automatically. Supported drivers are: `mail`, `smtp`, `sendmail`, `mandrill`.
224
+
If you're using something else, for example, `ses` or `sparkpost` - native PHP `mail()` function would be used as a driver.
225
+
226
+
Unfortunately, we're currently not supporting all of Laravel's mail drivers, because [Monolog email handlers](https://github.com/Seldaek/monolog/blob/master/doc/02-handlers-formatters-processors.md#send-alerts-and-emails) don't.
227
+
Maybe in future other drivers would be supported too.
228
+
229
+
However, you can totally change this behaviour, by overriding `getMailerHandler` method:
230
+
```php
231
+
class Foo extends Command
232
+
{
233
+
use Loggable;
234
+
235
+
protected functiongetMailerHandler()
236
+
{
237
+
$mailer = app('my-swift-mailer');
238
+
239
+
$message = $mailer->createMessage();
240
+
$message->setSubject('Hey! Something went wrong!');
0 commit comments