README

WireMailMailgun

Configuration

Usage

Usage is similar to the basic WireMail implementation, although a few extra options are available.

Basic usage is as such:

Initialize $mail = WireMail();

Set options $mail->to('Someone <someone@example.com>); ...

Send $mail->send();

Methods

$WireMailMailgun->to( string|array|null $recipients )

$WireMailMailgun->cc( string|array|null $recipients )

$WireMailMailgun->bcc( string|array|null $recipients )

$WireMailMailgun->setApiKey( string $apiKey )

$WireMailMailgun->setDomainName( string $domainName )

$WireMailMailgun->setTestMode( bool $bool )

$WireMailMailgun->setBatchMode( bool $bool )

When batch mode is set to true (default mode of operation), each recipient passed to the to() method will not be able to see who else is receiving the sent email. This will send one email per "To:" recipient.

Set to false to disable this behavior. This will send one email with multiple "To:" recipients.

Note that in both cases all CCs and BCCs will be delivered for each email sent. This means that if batch mode is on, that you have 10 "To:" recipients and 3 CCs, 40 emails will be sent in total.

Add a tag to the email. Note that there is a maximum number of 3 tags allowed per email.

Also, the tag string should be ASCII only and its length should be 128 characters or less. If any of those conditions are not met, the module will convert any non-ASCII characters to ASCII and trim the string length to 128.

$WireMailMailgun->validateEmail( string $email )

Validates a single address using Mailgun's address validation service.