PHP Класс messenger

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$addresses
$extra_headers
$from
$mail_priority
$msg
$replyto
$subject
$use_queue

Защищенные свойства (Protected)

Свойство Тип Описание
$template phpbb\template\template

Открытые методы

Метод Описание
anti_abuse_headers ( array $config, user $user ) : null Adds X-AntiAbuse headers
assign_block_vars ( $blockname, $vars )
assign_vars ( $vars ) assign variables to email template
bcc ( $address, $realname = '' ) Sets an bcc address to send to
build_header ( $to, $cc, $bcc ) Return email header
cc ( $address, $realname = '' ) Sets an cc address to send to
error ( $type, $msg ) Add error message to log
from ( $address ) Set the from address
generate_message_id ( ) : string Generates a valid message id to be used in emails
headers ( $headers ) set up extra mail headers
im ( $address, $realname = '' ) Sets a im contact to send to
messenger ( $use_queue = true ) Constructor
msg_email ( ) Send out emails
msg_jabber ( ) Send jabber message out
replyto ( $address ) Set the reply to address
reset ( ) Resets all the data (address, template file, etc etc) to default
save_queue ( ) Save to queue
send ( $method = NOTIFY_EMAIL, $break = false ) Send the mail out to the recipients set previously in var $this->addresses
set_addresses ( array $user ) Set addresses for to/im as available
set_mail_priority ( $priority = MAIL_NORMAL_PRIORITY ) Set the email priority
subject ( $subject = '' ) set up subject for mail
template ( $template_file, $template_lang = '', $template_path = '', $template_dir_prefix = '' ) Set email template to use
to ( $address, $realname = '' ) Sets an email address to send to

Защищенные методы

Метод Описание
set_template_paths ( $path_name, $paths ) Set template paths to load
setup_template ( ) Setup template engine

Описание методов

anti_abuse_headers() публичный Метод

Adds X-AntiAbuse headers
public anti_abuse_headers ( array $config, user $user ) : null
$config array Configuration array
$user user A user object
Результат null

assign_block_vars() публичный Метод

public assign_block_vars ( $blockname, $vars )

assign_vars() публичный Метод

assign variables to email template
public assign_vars ( $vars )

bcc() публичный Метод

Sets an bcc address to send to
public bcc ( $address, $realname = '' )

build_header() публичный Метод

Return email header
public build_header ( $to, $cc, $bcc )

cc() публичный Метод

Sets an cc address to send to
public cc ( $address, $realname = '' )

error() публичный Метод

Add error message to log
public error ( $type, $msg )

from() публичный Метод

Set the from address
public from ( $address )

generate_message_id() публичный Метод

Generates a valid message id to be used in emails
public generate_message_id ( ) : string
Результат string message id

headers() публичный Метод

set up extra mail headers
public headers ( $headers )

im() публичный Метод

Sets a im contact to send to
public im ( $address, $realname = '' )

messenger() публичный Метод

Constructor
public messenger ( $use_queue = true )

msg_email() публичный Метод

Send out emails
public msg_email ( )

msg_jabber() публичный Метод

Send jabber message out
public msg_jabber ( )

replyto() публичный Метод

Set the reply to address
public replyto ( $address )

reset() публичный Метод

Resets all the data (address, template file, etc etc) to default
public reset ( )

save_queue() публичный Метод

Save to queue
public save_queue ( )

send() публичный Метод

Send the mail out to the recipients set previously in var $this->addresses
public send ( $method = NOTIFY_EMAIL, $break = false )

set_addresses() публичный Метод

Set addresses for to/im as available
public set_addresses ( array $user )
$user array User row

set_mail_priority() публичный Метод

Set the email priority
public set_mail_priority ( $priority = MAIL_NORMAL_PRIORITY )

set_template_paths() защищенный Метод

Set template paths to load
protected set_template_paths ( $path_name, $paths )

setup_template() защищенный Метод

Setup template engine
protected setup_template ( )

subject() публичный Метод

set up subject for mail
public subject ( $subject = '' )

template() публичный Метод

Set email template to use
public template ( $template_file, $template_lang = '', $template_path = '', $template_dir_prefix = '' )

to() публичный Метод

Sets an email address to send to
public to ( $address, $realname = '' )

Описание свойств

$addresses публичное свойство

public $addresses

$extra_headers публичное свойство

public $extra_headers

$from публичное свойство

public $from

$mail_priority публичное свойство

public $mail_priority

$msg публичное свойство

public $msg

$replyto публичное свойство

public $replyto

$subject публичное свойство

public $subject

$template защищенное свойство

protected template,phpbb\template $template
Результат phpbb\template\template

$use_queue публичное свойство

public $use_queue