class message

Class message Holds all information for an email and sends it in the end

Properties

protected string $server_name
protected string $subject
protected string $body
protected string $template
protected array $template_vars
protected string $sender_ip
protected string $sender_name
protected string $sender_address
protected string $sender_lang
protected string|int $sender_id
protected string $sender_username
protected string $sender_jabber
protected int $sender_notify_type
protected array $recipients

Methods

__construct(string $server_name)

Construct

null
set_subject(string $subject)

Set the subject of the email

null
set_body(string $body)

Set the body of the email text

null
set_template(string $template)

Set the name of the email template to use

null
set_template_vars(array $template_vars)

Set the array with the "template" data for the email

null
add_recipient_from_user_row(array $user)

Add a recipient from \phpbb\user

null
add_recipient(string $recipient_name, string $recipient_address, string $recipient_lang, int $recipient_notify_type = NOTIFY_EMAIL, string $recipient_username = '', string $recipient_jabber = '')

Add a recipient

null
set_sender_from_user(user $user)

Set the senders data from \phpbb\user object

null
set_sender(string $sender_ip, string $sender_name, string $sender_address, string $sender_lang = '', int $sender_id = 0, string $sender_username = '', string $sender_jabber = '')

Set the senders data

null
set_sender_notify_type(int $sender_notify_type)

Which notification type should be used? Jabber, Email, ...?

null
cc_sender()

Ok, now the same email if CC specified, but without exposing the user's email address

null
send(messenger $messenger, string $contact)

Send the email

Details

at line 59
__construct(string $server_name)

Construct

Parameters

string $server_name

Used for AntiAbuse header

at line 70
null set_subject(string $subject)

Set the subject of the email

Parameters

string $subject

Return Value

null

at line 81
null set_body(string $body)

Set the body of the email text

Parameters

string $body

Return Value

null

at line 92
null set_template(string $template)

Set the name of the email template to use

Parameters

string $template

Return Value

null

at line 103
null set_template_vars(array $template_vars)

Set the array with the "template" data for the email

Parameters

array $template_vars

Return Value

null

at line 114
null add_recipient_from_user_row(array $user)

Add a recipient from \phpbb\user

Parameters

array $user

Return Value

null

at line 137
null add_recipient(string $recipient_name, string $recipient_address, string $recipient_lang, int $recipient_notify_type = NOTIFY_EMAIL, string $recipient_username = '', string $recipient_jabber = '')

Add a recipient

Parameters

string $recipient_name

Displayed sender name

string $recipient_address

Email address

string $recipient_lang
int $recipient_notify_type

Used notification methods (Jabber, Email, ...)

string $recipient_username

User Name (used for AntiAbuse header)

string $recipient_jabber

Return Value

null

at line 156
null set_sender_from_user(user $user)

Set the senders data from \phpbb\user object

Parameters

user $user

Return Value

null

at line 183
null set_sender(string $sender_ip, string $sender_name, string $sender_address, string $sender_lang = '', int $sender_id = 0, string $sender_username = '', string $sender_jabber = '')

Set the senders data

Parameters

string $sender_ip
string $sender_name

Displayed sender name

string $sender_address

Email address

string $sender_lang
int $sender_id

User ID

string $sender_username

User Name (used for AntiAbuse header)

string $sender_jabber

Return Value

null

at line 200
null set_sender_notify_type(int $sender_notify_type)

Which notification type should be used? Jabber, Email, ...?

Parameters

int $sender_notify_type

Return Value

null

at line 210
null cc_sender()

Ok, now the same email if CC specified, but without exposing the user's email address

Return Value

null

at line 239
null send(messenger $messenger, string $contact)

Send the email

Parameters

messenger $messenger
string $contact

Return Value

null