Constants

Version

Version = '5.1'

Версия

Properties

$DOMAIN

$DOMAIN : string

Домен

Type

string

$Mailer

$Mailer : string

Тип отправителя

Type

string

$Sendmail

$Sendmail : string

Путь к сендмейлу

Type

string

$Host

$Host : string

Хост

Type

string

$Port

$Port : integer

Порт

Type

integer

$Helo

$Helo : string

Строка Hello

Type

string

$Username

$Username : string

Пользователь

Type

string

$UserPass

$UserPass : string

Пароль

Type

string

$Timeout

$Timeout : integer

Таймаут подключения

Type

integer

$SMTPSecure

$SMTPSecure : string

Безопасность SMTP (ssl|tls и т.д.)

Type

string

$SMTPAuth

$SMTPAuth : boolean

Авторизация в SMTP

Type

boolean

$SMTPDebug

$SMTPDebug : boolean

Включить режим отладки

Type

boolean

$SMTPKeepAlive

$SMTPKeepAlive : boolean

Держать подключение активным

Type

boolean

$callback

$callback : string

Callback Action function name the function that handles the result of the send email action. Parameters: bool $result result of the send action string $to email address of the recipient string $cc cc email addresses string $bcc bcc email addresses string $subject the subject string $body the email body

Type

string

$boundary

$boundary : array

Массив разделителей

Type

array

Methods

__construct()

__construct(boolean  $mailer) 

Constructor

Parameters

boolean $mailer

Тип мейлера

Create()

Create(string  $mailer, string  $domain = '') : \Colibri\IO\Mail\Sender

Статический конструктор

Parameters

string $mailer

MailerTypes::*

string $domain

домен

Returns

\Colibri\IO\Mail\Sender

IsSMTP()

IsSMTP() : void

Sets Mailer to send message using SMTP.

IsMail()

IsMail() : void

Sets Mailer to send message using PHP mail() function.

IsSendmail()

IsSendmail() : void

Sets Mailer to send message using the $Sendmail program.

IsQmail()

IsQmail() : void

Sets Mailer to send message using the qmail MTA.

Send()

Send(\Colibri\IO\Mail\Message  $m) : boolean

Creates message and assigns Mailer. If the message is not sent successfully then it returns false. Use the ErrorInfo variable to view description of the error.

Parameters

\Colibri\IO\Mail\Message $m

Returns

boolean

SendmailSend()

SendmailSend(\Colibri\IO\Mail\Message  $m, string  $header, string  $body) : boolean

Отправить письмо через Sendmail

Parameters

\Colibri\IO\Mail\Message $m
string $header
string $body

Returns

boolean

MailSend()

MailSend(\Colibri\IO\Mail\Message  $m, string  $header, string  $body) : boolean

Отпавить письмо через функцию mail

Parameters

\Colibri\IO\Mail\Message $m
string $header
string $body

Returns

boolean

SmtpSend()

SmtpSend(\Colibri\IO\Mail\Message  $m, string  $header, string  $body) : boolean

Отправить письмо через сторонний SMTP

Parameters

\Colibri\IO\Mail\Message $m
string $header
string $body

Returns

boolean

SmtpConnect()

SmtpConnect() : void

Подключиться к SMTP

SmtpClose()

SmtpClose() : void

Закрыть подключение к SMTP

AttachAll()

AttachAll(\Colibri\IO\Mail\Message  $m) : string

Attaches all fs, string, and binary attachments to the message.

Returns an empty string on failure.

Parameters

\Colibri\IO\Mail\Message $m

Returns

string

_appendToHeader()

_appendToHeader(string  $type, string  $addr) : string

Creates recipient headers.

Parameters

string $type
string $addr

Returns

string

_setWordWrap()

_setWordWrap(\Colibri\IO\Mail\Message  $m) : void

Set the body wrapping.

Parameters

\Colibri\IO\Mail\Message $m

_createHeader()

_createHeader(\Colibri\IO\Mail\Message  $m) : string

Assembles message header.

Parameters

\Colibri\IO\Mail\Message $m

Returns

string —

The assembled header

_getMailMIME()

_getMailMIME(\Colibri\IO\Mail\Message  $m) : string

Returns the message MIME.

Parameters

\Colibri\IO\Mail\Message $m

Returns

string

_createBody()

_createBody(\Colibri\IO\Mail\Message  $m) : string

Assembles the message body. Returns an empty string on failure.

Parameters

\Colibri\IO\Mail\Message $m

Returns

string —

The assembled message body

_hostName()

_hostName() : string

Returns the server hostname or 'localhost.localdomain' if unknown.

Returns

string