Helper
class Helper
Methods
Build a person string compliant to RFC2822
Build a list of person strings compliant to RFC2822
Build a mail header tag compliant to RFC2822
Build a list of name=>email pairs compliant to RFC2822
Format a text with a special encoding
Search the MIME type of a file
Converts HTML to plain text
De-duplicate a set of name=>email pairs to let each email just once
Clean and build a set of name=>email pairs
Returns the ASCII equivalent of a character
ASCII validator
Check if an email address is valid
Details
at line 48
static string
mailTagger(string $mail = '', string $name = null)
Build a person string compliant to RFC2822
at line 59
static string
mailListTagger(array $list)
Build a list of person strings compliant to RFC2822
at line 82
static string
headerTagger(string $name = '', string $value = '', array $adds = array())
Build a mail header tag compliant to RFC2822
at line 100
static string
listAddresses(array $list = array(), string $type = 'to')
Build a list of name=>email pairs compliant to RFC2822
at line 119
static string
formatText(string $txt = '', string $type = 'plain', bool $spaces = false)
Format a text with a special encoding
at line 150
static string
getMimeType(string $filename = '')
Search the MIME type of a file
at line 171
static string
html2text(string $str)
Converts HTML to plain text
at line 182
static array
deduplicate(array $array)
De-duplicate a set of name=>email pairs to let each email just once
at line 218
static array
checkPeopleArgs()
Clean and build a set of name=>email pairs
Arguments can be writtent as : ( 'my@email.address' ) ( 'my@email.address', 'my name' ) ( array( 'my name'=>'my@email.address' ) ) ( array( 'my name'=>'my@email.address', 'another name'=>'another@email.address' ) ) ( array( 'my name'=>'my@email.address', 'another@email.address' ) )
at line 256
static string
charAscii(string $char)
Returns the ASCII equivalent of a character
at line 269
static bool
isAscii(string $string)
ASCII validator
at line 280
static bool
isEmail(string $str = '')
Check if an email address is valid