easy php mail sender
- native socket implementation
- support SSL/TLS
- support HTML code
- small size only 10kb
- single file, simple reference
- easy expansion
- support php all version (recommend 5.3.0 and later)
- ......
- attachments are not supported
$options = array(
'smtp_host' => 'mail.xx.com',
'smtp_port' => 25,
'user_name' => '[email protected]',
'password' => '1',
'isHtml' => true,
);
$m = new Mailer($options);
$m->setOption('debug', true);
//$m->enableSSL(true);
//$m->enableTLS(true);
// $to = array(
// '[email protected]',
// '[email protected]',
// array('label'=>'test6','address'=>'[email protected]'),
// );
// $m->setTo($to);
$m->setTo('[email protected]');
//$m->setBCC('[email protected]');
//$m->setCC('[email protected]');
//$m->setFrom('[email protected]');
$m->setFrom(array('label'=>'Admin Group','address'=>'[email protected]'));
$m->setSubject('code:'.rand());
$m->setBody(rand().'test body<h1>html</h1>');
$m->send();