tlikai / yii-mailer
YiiMailer is a mail extensions based on Yii Framework
Installs: 54
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 4
Open Issues: 0
Type:yii-extension
Requires
- php: >=5.1.0
This package is not auto-updated.
Last update: 2025-02-25 05:51:52 UTC
README
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);