Kinglozzer\SilverStripeMailgunner\Mailer
Synopsis
class Mailer
extends Mailer
{
- // members
- private static string $api_domain = '';
- private static string $api_endpoint = '';
- private static string $api_key = '';
- private static boolean $debug = false;
- protected array $tempFileHandles = ;
- protected Mailgun $mailgunClient;
- // methods
- public void __construct()
- public Mailer setMailgunClient()
- public Mailgun getMailgunClient()
- public void sendPlain()
- public void sendHTML()
- protected void sendMessage()
- protected void buildMessage()
- protected array parseAddresses()
- protected array prepareAttachments()
- protected string writeToTempFile()
- protected void closeTempFileHandles()
Hierarchy
Extends
- Mailer
Tasks
Line | Task |
---|---|
229+ | This can't deal with mismatched quotes, or commas in names. E.g. "Smith, John" <john.smith@example.com> or "John O'smith" <john.osmith@example.com> |
258+ | Can we handle this better? |
Members
private
- $api_domain — string
- $api_endpoint — string
- $api_key — string
- $debug — boolean
protected
- $mailgunClient — Mailgun\Mailgun
- $tempFileHandles
—
array
An array of temporary file handles opened to store attachments
Methods
protected
- buildMessage()
- closeTempFileHandles()
- parseAddresses()
- prepareAttachments() — Prepare attachments for sending. SilverStripe extracts the content and passes that to the mailer, so to save encoding it we just write them all to individual files and let Mailgun deal with the rest.
- sendMessage()
- writeToTempFile()
public
- __construct() — {@inheritdoc}
- getMailgunClient()
- sendHTML() — {@inheritdoc}
- sendPlain() — {@inheritdoc}
- setMailgunClient()