neosrulez/neos-mailgun

There is no license information available for the latest version (1.0.0) of this package.

A Neos Flow package to easily use the mailgun api

1.0.0 2022-02-09 19:03 UTC

This package is not auto-updated.

Last update: 2024-11-15 06:58:51 UTC


README

A Neos Flow package to easily use the mailgun api.

Installation

Just run composer require neosrulez/neos-mailgun

Usage

use NeosRulez\Neos\Mailgun\Message;

$message = new Message();
$message->setFrom('foo-from@bar.com');
$message->setTo('foo-to@bar.com');
$message->setCc('foo-cc@bar.com');
$message->setBcc('foo-bcc@bar.com');
$message->setSubject('This is the body');
$message->setBody('<strong>This is the body</strong>', 'text/html');

// Desired time of delivery. Note: Messages can be scheduled for a maximum of 3 days in the future.
$message->setDeliveryTime("tomorrow 8:00AM");

$message->setAttachments([
    '/data/neos/Data/foo.pdf'
]);
$message->send();

Configuration

NeosRulez:
  Neos:
    Mailgun:
      apiKey: 'your-mailgun-api-key'
      domain: 'your-mailgun-domain'
#      server: 'https://api.eu.mailgun.net' # for EU servers

Author