Coder Social home page Coder Social logo

wiremailmailgun's Introduction

WireMailMailgun

Mailgun module for ProcessWire

Configuration

Set settings in module configuration page.

Usage

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

Basic usage is as such:

  1. Initialize $mail = WireMail();
  2. Set options $mail->to('Someone <[email protected]>); ...
  3. 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.

Important: Mailgun has a maximum hard limit of recipients allowed per batch of 1,000. Read more about batch sending.

$WireMailMailgun->setClickTracking( bool $bool )

$WireMailMailgun->setOpenTracking( bool $bool )

$WireMailMailgun->addAttachment( string $filepath )

Usage is the same as realpath() internally for convenience.

$WireMailMailgun->addTag( string $tag )

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.

For more information on what this method returns, see Mailgun's documentation.

wiremailmailgun's People

Contributors

plauclair avatar

Watchers

James Cloos avatar Benjamin Milde avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.