AbstractMailer
abstract class AbstractMailer
Describes specification for all mailers.
Properties
| protected string | $layout | The layout to be used with email. |
|
| protected MailerService | $mailer | The mailer service object sending the mail. |
|
| protected string | $style | The style to be used with email. |
|
| protected Users | $user | The user to send the email. |
Methods
__construct(Users $user)
Constructor for AbstractMailer
bool
buildAndSend(string|null $layout = null, array $attachments = [], string|null $layoutPath = null, string|null $templatePath = null, string|null $styles = null, string|null $stylesPath = null)
Common send logic shared by all mailers.
array
getData()
Used to retrieve data to be used in E-mail.
string
getSubject()
Returns subject for E-mail.
string
getTemplate()
Returns the template to be used.
bool
send()
Send the mail
static bool
sendTo(Users $user)
Statically sends E-mail
Details
at line 41
__construct(Users $user)
Constructor for AbstractMailer
at line 58
bool
buildAndSend(string|null $layout = null, array $attachments = [], string|null $layoutPath = null, string|null $templatePath = null, string|null $styles = null, string|null $stylesPath = null)
Common send logic shared by all mailers.
at line 86
abstract protected array
getData()
Used to retrieve data to be used in E-mail.
at line 93
abstract protected string
getSubject()
Returns subject for E-mail.
at line 100
abstract protected string
getTemplate()
Returns the template to be used.
at line 107
bool
send()
Send the mail
at line 117
static bool
sendTo(Users $user)
Statically sends E-mail