KMPMailer
extends Mailer
in package
uses
TemplateAwareMailerTrait
Table of Contents
Properties
- $_preloadedTemplate : EmailTemplate|null
- Pre-loaded template for generic workflow emails.
Methods
- render() : array<string|int, mixed>
- Override the render method to use database templates
- sendFromTemplate() : void
- Send a DB-backed email template by slug or numeric template ID.
- getCurrentAction() : string|null
- Get the current action being called This is determined by looking at the backtrace
- getDbTemplate() : EmailTemplate|null
- Get the preloaded database template for slug-based sending.
- renderFromDb() : array<string|int, mixed>
- Render email from database template
Properties
$_preloadedTemplate
Pre-loaded template for generic workflow emails.
protected
EmailTemplate|null
$_preloadedTemplate
= null
When set, render() uses this DB template instead of the file-based template.
Methods
render()
Override the render method to use database templates
public
render([string $content = '' ]) : array<string|int, mixed>
Parameters
- $content : string = ''
-
Content
Return values
array<string|int, mixed>sendFromTemplate()
Send a DB-backed email template by slug or numeric template ID.
public
sendFromTemplate(string $to, string $_templateId[, string|null $_replyTo = null ], mixed ...$templateVars) : void
Parameters
- $to : string
- $_templateId : string
- $_replyTo : string|null = null
- $templateVars : mixed
Tags
getCurrentAction()
Get the current action being called This is determined by looking at the backtrace
protected
getCurrentAction() : string|null
Return values
string|nullgetDbTemplate()
Get the preloaded database template for slug-based sending.
protected
getDbTemplate() : EmailTemplate|null
Return values
EmailTemplate|nullrenderFromDb()
Render email from database template
protected
renderFromDb(EmailTemplate $template[, string $content = '' ]) : array<string|int, mixed>
Parameters
- $template : EmailTemplate
-
Database template
- $content : string = ''
-
Fallback content