itul / laramailparser
Laravel Mail Parser Boiler Plate
v2.0.0
2022-11-15 02:09 UTC
Requires
- php: ^7.4|^8.0
- ezyang/htmlpurifier: ^4.11
- illuminate/support: ^8.0
- zbateson/mail-mime-parser: ^2.2.3
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.0
README
This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.
Installation
You can install the package via composer:
composer require itul/laramailparser
Make a new parser from a template
php artisan laramailparser:make
This will ask you for the name of the new parser.
Once you input the name it will be generated under app/Console/Commands
Now you are free to edit the new command you just made.
Routing
Once you have the parser setup you will need to route inbound email to it.
This can be done easilly from cpanel by setting up a Default Address
under the mail section.
In the Default Address Screen
- select the domain you want to use.
- Under
Advanced Options
: choosePipe to a Program
- In the path input enter
php -q /PATH/TO/LARAVEL/artisan NAMEOFPARSERHERE
- Replace
/PATH/TO/LARAVEL
with the actual path to your project - Replace
NAMEOFPARSERHERE
with the name of the parser you created