LeKoala\EmailTemplates\Models\Emailing
Send emails to a group of members
- Author: lekoala
Synopsis
class Emailing
extends DataObject
{
- // members
- private static string $table_name = 'Emailing';
- private static array $db = ;
- private static array $summary_fields = ;
- private static array $searchable_fields = ;
- private static array $translate = ;
- // methods
- public void getTitle()
- public void getCMSActions()
- public void getCMSFields()
- public DataList getAllRecipients()
- public array listRecipientsWithInvalidEmails()
- public array getNormalizedRecipientsList()
- public static array getMembersLocales()
- public array listRecipients()
- protected Tab previewTab()
- public void canView()
- public void canEdit()
- public void canCreate()
- public void canDelete()
- public string renderTemplate()
- public array collectMergeVars()
- public BetterEmail getEmail()
- public string getMergeVarsHeader()
- public array getEmailsByLocales()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Members
private
- $db
- $searchable_fields
- $summary_fields
- $table_name
- $translate
Methods
protected
- previewTab() — Provide content for the Preview tab
public
- canCreate()
- canDelete()
- canEdit()
- canView()
- collectMergeVars() — Collect all merge vars
- getAllRecipients()
- getCMSActions()
- getCMSFields()
- getEmail() — Returns an instance of an Email with the content of the emailing
- getEmailsByLocales() — Returns an array of emails with members by locale, grouped by a given number of recipients Some apis prevent sending too many emails at the same time
- getMembersLocales()
- getMergeVarsHeader() — Various email providers use various types of mail merge headers By default, we use mandrill that is expected to work for other platforms through compat layer
- getNormalizedRecipientsList() — List of ids
- getTitle()
- listRecipients()
- listRecipientsWithInvalidEmails() — List all invalid recipients
- renderTemplate() — Get rendered body