Download the PHP package ome-tronet/laravel-frontapp-mailer without Composer
On this page you can find all versions of the php package ome-tronet/laravel-frontapp-mailer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ome-tronet/laravel-frontapp-mailer
More information about ome-tronet/laravel-frontapp-mailer
Files in ome-tronet/laravel-frontapp-mailer
Package laravel-frontapp-mailer
Short Description Laravel mail driver for Front customer service platform
License MIT
Homepage https://github.com/ome-tronet/laravel-frontapp-mailer
Informations about the package laravel-frontapp-mailer
Laravel Package for using Front as a mailer
This package registers a laravel mailer so you can send your application's mails via Front API (https://front.com/). This can be useful if you are expecting a conversation with the recipient and want to follow it up in Front. You also have the option of tagging emails when they are sent in order to classify them in Front.
Requires
- PHP ^8.2
- Laravel ^10.0||^11.0
Installation
You can install the package via composer:
Add your Frontapp API token to your .env file like this:
You must publish the config file frontapp-mailer.php
in order to specify all allowed senders.
Just FYI: This config will automatically be added as a new config key of mail.mailers
by the package when booting.
To add your senders you need the Front channel_id
of the shared inbox. If you want to send mails from a specific user you also need to provide the author_id
of the teammate.
Usage
Create your mailable as usual like php artisan make:mail MyMail
and use one of the senders you added to the frontapp-mailer.php
config file as address in the envelope. You may also add front tags by their tag_id
to the conversation upfront.
Now you can use the Front mailer everywhere you like to send this mailable to your recipients.
Where to get the API token
In the front app, go to Settings > Developers and click on the API tokens tab. There you can get an existing API token or create a new one.
Where do I find the IDs of channels, authors, and tags
Got to Front's API reference page to list the channels, teammates and tags. If you provide your API token, the page will generate the API call ready to use as e.g. curl shell command:
- https://dev.frontapp.com/reference/list-channels
- https://dev.frontapp.com/reference/list-teammates
- https://dev.frontapp.com/reference/list-tags
Extract the IDs of the channels ('cha_XXXXX'), authors ('tea_XXXXX') and tags ('tag_XXXXX') that you want to use in your application from the API responses.
Changelog
Please see CHANGELOG for more information on what has changed recently.
License
The MIT License (MIT). Please see License File for more information.