Download the PHP package matchory/laravel-mailgun-templates-channel without Composer
On this page you can find all versions of the php package matchory/laravel-mailgun-templates-channel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download matchory/laravel-mailgun-templates-channel
More information about matchory/laravel-mailgun-templates-channel
Files in matchory/laravel-mailgun-templates-channel
Package laravel-mailgun-templates-channel
Short Description A Laravel notification channel for Mailgun's templated messages.
License MIT
Informations about the package laravel-mailgun-templates-channel
Mailgun Templates Messages Notification Channel
Provides a notification channel for Mailgun's message templates to Laravel applications.
This library adds a new notification channel to your app that moves email templates from Laravel to Mailgun. This is useful if, for example, you need to send emails from multiple applications, or need a simple way for non-developers to manage email templates.
Installation
Install the library from composer:
`
Configuration
Configuration follows the instructions outlined in the Laravel documentation: You should put your Mailgun credentials in
the config/services.php
file:
(back to top)
Usage
To send message templates, you should first create a template on Mailgun (navigate to "Sending" > "Templates" to manage
your templates in the Mailgun web app). Then, create a new notification with a toMailgun
method:
Send that notification, and you'll receive an email with the rendered template:
That's it - you're able to use message templates now!
(back to top)
Advanced usage
The MailgunTemplatedMessage
instance exposes several message building methods to add more metadata to your message.
This includes the usual stuff like subject, CC, BCC, recipient, and sender, and also options and params.
By setting additional options, you can control Mailgun features like delayed delivery and tracking; by setting params,
you can add template variables to be used while Mailgun renders the template.
Refer to the Mailgun documentation to learn about the specifics.
Message options
The following methods can be leveraged to handle message options:
(back to top)
Template parameters
The following methods can be leveraged to handle template rendering parameters:
(back to top)
Managing templates
Unfortunately, the Mailgun SDK currently has no facilities to manage message templates, although the API endpoints exist on the Mailgun servers (See this issue for reference).
As soon as the templates API is implemented, we will add managing capabilities to this library - including automatically updating your message templates from local blade files.
(back to top)
Contributions
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue. Don't forget to give the project a star! Thanks again!
(back to top)
License
Distributed under the MIT License. See LICENSE for more information.
(back to top)
All versions of laravel-mailgun-templates-channel with dependencies
mailgun/mailgun-php Version ^3.5
illuminate/contracts Version ^8.67|^9.19|^10.0