MailHelper
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 |
---|---|
since |
1.7.0 |
package |
Joomla CMS |
Methods
checkContent
Check the content after regular expression function call.
checkContent( content) :
throws |
|
---|---|
since |
4.1.0 |
Arguments
- content
string
Content to be checked.
Response
void
cleanAddress
Verifies that an email address does not have any extra headers injected into it.
cleanAddress( address) :
since |
1.7.0 |
---|
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( body) :
since |
1.7.0 |
---|
Arguments
- body
string
email body string.
Response
string
Cleaned email body string.
cleanLine
Cleans single line inputs.
cleanLine( value) :
since |
1.7.0 |
---|
Arguments
- value
string
String to be cleaned.
Response
string
Cleaned string.
cleanSubject
Cleans any injected headers from the subject string.
cleanSubject( subject) :
since |
1.7.0 |
---|
Arguments
- subject
string
email subject string.
Response
string
Cleaned email subject string.
cleanText
Cleans multi-line inputs.
cleanText( value) :
since |
1.7.0 |
---|
Arguments
- value
string
Multi-line string to be cleaned.
Response
string
Cleaned multi-line string.
convertRelativeToAbsoluteUrls
Convert relative (links, images sources) to absolute urls so that content is accessible in email
convertRelativeToAbsoluteUrls( content) :
since |
4.1.0 |
---|
Arguments
- content
string
The content need to convert
Response
string
The converted content which the relative urls are converted to absolute urls
isEmailAddress
Verifies that the string is in a proper email address format.
isEmailAddress( email) :
since |
1.7.0 |
---|
Arguments
string
String to be verified.
Response
bool
True if string has the correct format; false otherwise.