Menu

## Email extends KBase
in package

Email.php : 18

Email class for sending emails.

##### Tags

see
  https://www.kotchasan.com/

### 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

KBase.php : 26

Config class instance.

`protected static object $cfg`

#### $error

Email.php : 23
`protected mixed $error`

Error information for email sending

#### $request

KBase.php : 33

Server request class instance.

`protected static Request $request`

### Methods

#### error()

Email.php : 30

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()

Email.php : 40

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()

Email.php : 57

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.

##### Return values

static —

## Search results