Email
extends KBase
in package
Email class for sending emails.
Tags
Table of Contents
- $cfg : object
- Config class instance.
- $error : mixed
- $request : Request
- Server request class instance.
- error() : bool
- Check if there is an error in email sending.
- getErrorMessage() : string
- Get the error message of the email sending.
- send() : static
- Send an email with custom details.
Properties
$cfg
Config class instance.
protected
static object
$cfg
$error
protected
mixed
$error
Error information for email sending
$request
Server request class instance.
protected
static Request
$request
Methods
error()
Check if there is an error in email sending.
public
error() : bool
Return values
bool —True if there is an error, false if the email was sent successfully
getErrorMessage()
Get the error message of the email sending.
public
getErrorMessage() : string
Return values
string —Error message. If there is no error, an empty string is returned.
send()
Send an email with custom details.
public
static send(string $mailto, string $replyto, string $subject, string $msg[, string $cc = '' ][, string $bcc = '' ]) : static
Parameters
- $mailto : string
-
Email address(es) of the recipient(s). Can be multiple addresses separated by commas.
- $replyto : string
-
Email address for the reply-to field. If empty, the noreply_email address will be used.
- $subject : string
-
Email subject.
- $msg : string
-
Email content. HTML is supported.
- $cc : string = ''
-
Email address(es) to be included in the CC field. Can be multiple addresses separated by commas.
- $bcc : string = ''
-
Email address(es) to be included in the BCC field. Can be multiple addresses separated by commas.