emercury-dev/smtp-php-mailer

Emercury Mailer Bridge

Installs: 11

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:symfony-mailer-bridge

0.1.1 2024-06-26 09:44 UTC

This package is auto-updated.

Last update: 2025-04-26 11:26:25 UTC


README

Provides Emercury integration for Symfony Mailer.

Configuration example:

# API
MAILER_DSN=emercury+api://KEY@default

where:

  • KEY is your Emercury token

Getting Started

composer require emercury-dev/smtp-php-mailer
use Emercury\Smtp\SmtpApiTransport;
use Symfony\Component\Mailer\Mailer;
use Symfony\Component\Mime\Email;
use Symfony\Component\Mime\Address;

$mailer = new Mailer(new SmtpApiTransport('xxxTokenxxx'));

$email = (new Email())
    ->from(new Address('hello@example.com', 'Hello'))
    ->to(new Address('you@example.com', 'You'))
    ->replyTo(new Address('hello@example.com', 'Hello'))
    ->subject('Hello!')
    ->text('Sending emails is fun!')
    ->html('<p>Sending emails is fun with HTML integration!</p>');

$mailer->send($email);