PHP Class messenger

ファイルを表示 Open project: phpbb/phpbb Class Usage Examples

Public Properties

Property Type Description
$addresses
$extra_headers
$from
$mail_priority
$msg
$replyto
$subject
$use_queue

Protected Properties

Property Type Description
$template phpbb\template\template

Public Methods

Method Description
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

Protected Methods

Method Description
set_template_paths ( $path_name, $paths ) Set template paths to load
setup_template ( ) Setup template engine

Method Details

anti_abuse_headers() public method

Adds X-AntiAbuse headers
public anti_abuse_headers ( array $config, user $user ) : null
$config array Configuration array
$user user A user object
return null

assign_block_vars() public method

public assign_block_vars ( $blockname, $vars )

assign_vars() public method

assign variables to email template
public assign_vars ( $vars )

bcc() public method

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

build_header() public method

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

cc() public method

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

error() public method

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

from() public method

Set the from address
public from ( $address )

generate_message_id() public method

Generates a valid message id to be used in emails
public generate_message_id ( ) : string
return string message id

headers() public method

set up extra mail headers
public headers ( $headers )

im() public method

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

messenger() public method

Constructor
public messenger ( $use_queue = true )

msg_email() public method

Send out emails
public msg_email ( )

msg_jabber() public method

Send jabber message out
public msg_jabber ( )

replyto() public method

Set the reply to address
public replyto ( $address )

reset() public method

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

save_queue() public method

Save to queue
public save_queue ( )

send() public method

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

set_addresses() public method

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

set_mail_priority() public method

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

set_template_paths() protected method

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

setup_template() protected method

Setup template engine
protected setup_template ( )

subject() public method

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

template() public method

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

to() public method

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

Property Details

$addresses public_oe property

public $addresses

$extra_headers public_oe property

public $extra_headers

$from public_oe property

public $from

$mail_priority public_oe property

public $mail_priority

$msg public_oe property

public $msg

$replyto public_oe property

public $replyto

$subject public_oe property

public $subject

$template protected_oe property

protected template,phpbb\template $template
return phpbb\template\template

$use_queue public_oe property

public $use_queue