Skip to content

lantongxue/phpmailsender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

phpmailsender

easy php mail sender

feature

  1. native socket implementation
  2. support SSL/TLS
  3. support HTML code
  4. small size only 10kb
  5. single file, simple reference
  6. easy expansion
  7. support php all version (recommend 5.3.0 and later)
  8. ......

defect

  1. attachments are not supported

example

$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();

About

简易的PHP邮件发送库

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages