JMailHelper/cleanAddress: Difference between revisions
From Joomla! Documentation
m removing red link to edit, no existant pages |
m preparing for archive only |
||
| Line 47: | Line 47: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=cleanAddress | category=cleanAddress | ||
category=JMailHelper | category=JMailHelper | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Latest revision as of 00:57, 25 March 2017
Description
Verifies that an e-mail address does not have any extra headers injected into it.
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
cleanAddress($address)
| Parameter Name | Default Value | Description |
|---|---|---|
| $address | $address E-Mail address. |
Returns
string|false E-Mail address string or boolean false if injected headers are present.
Defined in
libraries/joomla/mail/helper.php
Importing
jimport( 'joomla.mail.helper' );
Source Body
function cleanAddress($address)
{
if (preg_match("[\s;,]", $address)) {
return false;
}
return $address;
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
Code Examples