MAIL -> boolean from ( string address [, string name [, string charset [, string encoding ]]] )
Return TRUE if has been successfully set, FALSE if not. string address format is "localpart@domainpart.tld". Default values are: string charset: utf-8 string encoding: quoted-printable string encoding possible values are: quoted-printable or base64 Example (verification):

$m = new MAIL;

// set "From" mail address and name
$f = $m->From('localpart@domainpart.tld', 'My Name');

echo $f ? 'success' : 'error';
Example (deprecated):

$m = new MAIL;

// set "From" mail address, name, charset and encoding
$m->From = array(
'address'  => 'localpart@domainpart.tld', // required
'name'     => 'My Name', // optional
'charset'  => 'utf-8', // optional
'encoding' => 'base64' // optional
);

See Also: FUNC::is_mail() [ Comments ] Last update: Saturday, June 16, 2007