Driver for sending emails via Mailup api

1.3.0 2024-09-26 16:22 UTC

This package is auto-updated.

Last update: 2024-10-26 16:41:50 UTC


README

Latest Version on Packagist Total Downloads

A Laravel package for sending emails using the MailUp service API.

Installation

You can install the package via composer:

composer require advicepharmagroup/mailup

Basic Usage

  • In the config/services.php file add the following lines of code:
...

'mailup' => [
    'host'       => env('MAILUP_HOST'),
    'user'       => env('MAILUP_USER'),
    'secret'     => env('MAILUP_SECRET'),
    'force_html' => true,
],

...
  • In the config/mail.php file add the following lines of code:
'mailers' => [

    ...

    'mailup' => [
        'transport'  => 'mailup',
    ],
],
  • In your .env file:
...

MAILUP_HOST=HOST
MAILUP_USER=YOUR_USERNAME
MAILUP_SECRET=YOUR_SECRET

...
  • Example:
Route::get('/mail', function () {

    Mail::raw('Hello world', function (Message $message) {
        $message
            ->to('to@mail.com')
            ->from('from@mail.com');
    });

});