phpBB API Documentation
Class

phpbb\message\message

class message

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

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, 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
public __construct(string $server_name)

Construct

Parameters

string $server_name Used for AntiAbuse header

at line 70
public null set_subject(string $subject)

Set the subject of the email

Parameters

string $subject

Return Value

null

at line 81
public null set_body(string $body)

Set the body of the email text

Parameters

string $body

Return Value

null

at line 92
public null set_template(string $template)

Set the name of the email template to use

Parameters

string $template

Return Value

null

at line 103
public 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
public null add_recipient_from_user_row(array $user)

Add a recipient from \phpbb\user

Parameters

array $user

Return Value

null

at line 137
public 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
public null set_sender_from_user(user $user)

Set the senders data from \phpbb\user object

Parameters

user $user

Return Value

null

at line 183
public null set_sender(string $sender_ip, string $sender_name, string $sender_address, string $sender_lang = '', int $sender_id, 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
public 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
public 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
public null send(messenger $messenger, string $contact)

Send the email

Parameters

messenger $messenger
string $contact

Return Value

null