class JMailHelper


Located at : UKNOWVA_ROOT/libraries/joomla/mail/helper.php

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

Methods

static string
cleanLine(string $value)

Cleans single line inputs.

static string
cleanText(string $value)

Cleans multi-line inputs.

static string
cleanBody(string $body)

Cleans any injected headers from the email body.

static string
cleanSubject(string $subject)

Cleans any injected headers from the subject string.

static mixed
cleanAddress(string $address)

Verifies that an email address does not have any extra headers injected into it.

static boolean
isEmailAddress(string $email)

Verifies that the string is in a proper email address format.

Details

at line 33
static string cleanLine(string $value)

Cleans single line inputs.

Parameters

string $value String to be cleaned.

Return Value

string Cleaned string.

at line 47
static string cleanText(string $value)

Cleans multi-line inputs.

Parameters

string $value Multi-line string to be cleaned.

Return Value

string Cleaned multi-line string.

at line 61
static string cleanBody(string $body)

Cleans any injected headers from the email body.

Parameters

string $body email body string.

Return Value

string Cleaned email body string.

at line 76
static string cleanSubject(string $subject)

Cleans any injected headers from the subject string.

Parameters

string $subject email subject string.

Return Value

string Cleaned email subject string.

at line 90
static mixed cleanAddress(string $address)

Verifies that an email address does not have any extra headers injected into it.

Parameters

string $address email address.

Return Value

mixed email address string or boolean false if injected headers are present.

at line 107
static boolean isEmailAddress(string $email)

Verifies that the string is in a proper email address format.

Parameters

string $email String to be verified.

Return Value

boolean True if string has the correct format; false otherwise.