This gist is about adding support for Mailgun's parameters (o:tag, o:testmode, etc..) to your application.
-
Add these files to your Laravel project :
app/Mail/TransportManager.php
app/Mail/Transport/MailgunTransport.php
app/Providers/MailServiceProvider.php
-
In
app.php
, replace the lineIlluminate\Mail\MailServiceProvider::class,
withApp\Providers\MailServiceProvider::class,
- You can test your options using the provided command
app/Console/Commands/MailgunParameterTest.php
- Add the following line to the
$command
array inapp/Console/Kernel.php
:MailgunParameterTest::class,
- Run the test in console :
php artisan test:mailgun-parameter-test --to=%yourEmailAddressHere%
- Have a look at your Mailgun Logs and your should see a "Test delievered" entry! :)
Ok, i've some cache to clear.
But how can i use with mailable. I mean, inside command test, there's only an example with mailer right?
i tried something like that:
but on mailgun log, there are no tags reported