Class||Interface MailService
Methods
send()
send(\Mail $mail)
Sends the mail. Throws an exception if the mail cannot be sent.
Parameters
The mail to send |
Throws
- \IOException
if the mail couldn't be sent
- Inherited from \MailService
Tags
None found |
try_to_send()
try_to_send(\Mail $mail) : boolean
Tries to send the mail but doesn't throw any error whether the mail cannot be sent, it only returns false.
Parameters
The mail to send |
Returns
True if the mail could be sent, false otherwise.
- Inherited from \MailService
Tags
None found |
send_from_properties()
send_from_properties(string $mail_to, string $mail_subject, string $mail_content, string $mail_from = '', string $sender_name = 'admin') : boolean
Parameters
string | $mail_to | The mail recipients' address. |
string | $mail_subject | The mail subject. |
string | $mail_content | content of the mail |
string | $mail_from | The mail sender's address. |
string | $sender_name | The mail sender's name. If you don't use this parameter, the name of the site administrator will be taken. |
Returns
True if the mail could be sent, false otherwise.
- Inherited from \MailService
Tags
None found |
is_mail_valid()
is_mail_valid(string $mail_address) : boolean
Check whether the mail address is valid, it respects the mail RFC
Parameters
string | $mail_address |
Returns
true if the mail is valid, false otherwise
- Inherited from \MailService
Tags
None found |
get_mail_checking_regex()
get_mail_checking_regex() : string
Return the RFC mail regex.
Returns
the mail regex
- Inherited from \MailService
Tags
None found |
get_mail_checking_raw_regex()
get_mail_checking_raw_regex() : string
Return the RFC mail regex without delimiters, it's commonly used for compatibility with javascript regex.
Returns
the mail regex without delimiters
- Inherited from \MailService
Tags
None found |