Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 681 Bytes

README.md

File metadata and controls

38 lines (30 loc) · 681 Bytes

YiiMailer is a mail extensions based on Yii Framework

Requires

  • PHP >= 5
  • fsockopen function or configuration php mail

Configuration

'components' => array(
    'mailer' => array(
        // for smtp
        'class' => 'ext.mailer.SmtpMailer',
        'server' => 'smtp.163.com',
        'port' => '25',
        'username' => 'your username',
        'password' => 'your password',

        // for php mail
        'class' => 'ext.mailer.PhpMailer',
    ),
)

Usage

$to = array(
    'somemail@gmail.com',
);

// or

$to = 'somemail@gmail.com';

$subject = 'Hello Mailer';
$content = 'Some content';

Yii::app()->mailer->send($to, $subject, $content);