ProMailerEmail class

Handles sending of emails to subscribers

Copyright 2023 by Ryan Cramer This is a commercial module, do not distribute.

HOOKABLE METHODS

these are called for any email sent by ProMailer (including distributions and confirmations)

these are called only during distributions


Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the ProMailerEmail class also inherits all the methods and properties of: ProMailerTypeManager and Wire.

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
ProMailerEmail::emailInDomain(string $email, $domain)
bool

Is the given email in the given domain (or host)?

 
ProMailerEmail::getDefaultEmailPage()
Page NullPage

Get the default email template page

 
ProMailerEmail::getMailer()
WireMail

Get WireMail module

ProMailerEmail::install()
None 
ProMailerEmail::markupToText(string $markup)
string

Convert markup to text using best available method

ProMailerEmail::parseEmail(string $email)
array

Get all the parts of an email address

 
ProMailerEmail::populateConditionals(string $body, array $data)
string

Populate conditional {tag} statements in $body according to $data

 
ProMailerEmail::populatePlaceholders(string $body, array $data)
string

Populate placeholders from $data in $body

 
ProMailerEmail::renderMessageBody(ProMailerMessage $message, ProMailerSubscriber $subscriber)
string

Render message body for subscriber

 
ProMailerEmail::saveLog(string $str)
None

Save entry to sent email log

 
ProMailerEmail::send(WireMail $mailer)
int

Send a populated WireMail object

 
ProMailerEmail::sendFail(string $email, WireMail $mailer, string $error)
None

Hook called when message fails to send to subscriber

ProMailerEmail::sendMessage($message, $subscriber)
bool array

Send given message to given subscriber

 
ProMailerEmail::sendReady(string $email, WireMail $mailer)
bool

Hook called when message ready to send to email

ProMailerEmail::sent(string $email, WireMail $mailer)
None

Hook called after message has been sent to subscriber

ProMailerEmail::subscriberMessageFail(array $data)
None

Message failed to send to subscriber

ProMailerEmail::subscriberMessageReady(array $data)
bool

Message ready to send to subscriber

ProMailerEmail::subscriberMessageSent(array $data)
None

Message sent to subscriber

ProMailerEmail::table()
None 
ProMailerEmail::typeName()
None 
ProMailerEmail::uninstall()
None 

Additional methods and properties

In addition to the methods and properties above, ProMailerEmail also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.255