JMailHelper
Email helper class, provides static methods to perform various tasks relevant to the Joomla email routines.
TODO: Test these methods as the regex work is first run and not tested thoroughly
package |
Joomla.Platform |
---|---|
subpackage |
|
since |
11.1 |
Methods
cleanAddress
Verifies that an email address does not have any extra headers injected into it.
cleanAddress(string $address) : mixed
since |
11.1 |
---|
Arguments
- $address
string
email address.
Response
mixed
email address string or boolean false if injected headers are present.
cleanBody
Cleans any injected headers from the email body.
cleanBody(string $body) : string
since |
11.1 |
---|
Arguments
- $body
string
email body string.
Response
string
Cleaned email body string.
cleanLine
Cleans single line inputs.
cleanLine(string $value) : string
since |
11.1 |
---|
Arguments
- $value
string
String to be cleaned.
Response
string
Cleaned string.
cleanSubject
Cleans any injected headers from the subject string.
cleanSubject(string $subject) : string
since |
11.1 |
---|
Arguments
- $subject
string
email subject string.
Response
string
Cleaned email subject string.
cleanText
Cleans multi-line inputs.
cleanText(string $value) : string
since |
11.1 |
---|
Arguments
- $value
string
Multi-line string to be cleaned.
Response
string
Cleaned multi-line string.
isEmailAddress
Verifies that the string is in a proper email address format.
isEmailAddress(string $email) : boolean
since |
11.1 |
---|
Arguments
string
String to be verified.
Response
boolean
True if string has the correct format; false otherwise.