Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agoalofalife/postman
Schedule your sending mail on Laravel
https://github.com/agoalofalife/postman
laravel mail postman schedule-your-sending-mail
Last synced: about 1 month ago
JSON representation
Schedule your sending mail on Laravel
- Host: GitHub
- URL: https://github.com/agoalofalife/postman
- Owner: agoalofalife
- License: mit
- Created: 2017-09-13T12:20:23.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-06T12:06:24.000Z (almost 7 years ago)
- Last Synced: 2024-10-09T05:49:49.871Z (about 1 month ago)
- Topics: laravel, mail, postman, schedule-your-sending-mail
- Language: JavaScript
- Homepage:
- Size: 16.4 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
POSTMAN
> **Note** Required PHP version >= 7.1
> Obviously, you must have configured the database and Mail
**What is it?**
This package is for [Laravel](laravel.com). Using the interface you can send the emails on schedule.
It's simple! You are creating a letter and sending it at just the right time!
You intrigued?
Read on!
## Install
Installed via [composer](https://getcomposer.org/).```bash
composer require agoalofalife/postman```
Before you install the package, it is important to define your language.In file config/app.php
```php
'locale' => 'en',
```
> **Note** Out of the box `en` and `ru`.> if if your version is below laravel 5.5. insert service provider :
```php
...
agoalofalife\postman\SheduleEmailServiceProvider::class
```Next, you're executing the command:
```bash
php artisan postman:install
```
Now you can insert the template where you want.It could be your administrative panel or what else.
```php
...
@include('postman::app')
...
```now you can see your interface!
![postman](https://github.com/agoalofalife/postman/blob/master/start-page.jpg)
And last.. You need to work **cron**.
`App\Console\Kernel````php
if (config('postman.switcher')) {
$schedule->command(ParseCommand::class)->everyMinute();
}
```
## Custom Mode
Each letter has its own algorithm sending. Example :
- Send all as BCC
- Send all as CC
For this there are routines that implement the interface```php
agoalofalife\postman\Contract\Mode::class
```You must implement all three methods:
* getName()
* getDescription()
* postEmail()Of the first two all clear from the title.
`postEmail()` within the logic of sending.If something is not clear you can see examples in the source code.
Once you have implemented his mode, it is necessary to specify in the configuration file and execute the command :
```bash
php artisan postman:seed
```## Config
- You can set the column size```php
'ui' => [
'table' => [
'id' => 60,
'date' => 180,
'email.theme' => 180,
'email.text' => 400,
'mode.name' => 140,
'status_action_human' => 130,
'updated_at' => 140,
'operations' => 240,
]
]
```- List of available modes
```php
'modes' => [
\agoalofalife\postman\Modes\OneToAll::class,
\agoalofalife\postman\Modes\Each::class,
]
```
## Vue components
If you don't want to set using the templating Blade, it is possible to migrate a component to vue.
```
php artisan vendor:publish --tag=postman-components
```## Middleware
You can define your rules in config file.
```php/*
|--------------------------------------------------------------------------
| Middleware
|--------------------------------------------------------------------------
| Set middleware
*/
'middleware' => '',
```