helpers.php
Table of Contents
Functions
- sendEmail() : bool
- Send a simple email
- sendEmailTemplate() : bool
- Send an email using a template
- email() : Sender
- Create a new email Sender instance with fluent interface
Functions
sendEmail()
Send a simple email
sendEmail(string $to, string $subject, string $body[, bool $isHtml = true ][, ISettingSource|null $settings = null ]) : bool
Parameters
- $to : string
-
Recipient email address
- $subject : string
-
Email subject
- $body : string
-
Email body content
- $isHtml : bool = true
-
Whether the body is HTML (default: true)
- $settings : ISettingSource|null = null
-
Optional settings source for email configuration
Tags
Return values
bool —True if email was sent successfully
sendEmailTemplate()
Send an email using a template
sendEmailTemplate(string $to, string $subject, string $template[, array<string|int, mixed> $data = [] ][, ISettingSource|null $settings = null ][, string $basePath = '' ]) : bool
Parameters
- $to : string
-
Recipient email address
- $subject : string
-
Email subject
- $template : string
-
Template path relative to resources/views
- $data : array<string|int, mixed> = []
-
Data to pass to the template
- $settings : ISettingSource|null = null
-
Optional settings source for email configuration
- $basePath : string = ''
-
Base path for template resolution (default: current directory)
Tags
Return values
bool —True if email was sent successfully
email()
Create a new email Sender instance with fluent interface
email([ISettingSource|null $settings = null ][, string $basePath = '' ]) : Sender
Parameters
- $settings : ISettingSource|null = null
-
Optional settings source for email configuration
- $basePath : string = ''
-
Base path for template resolution (default: current directory)