tlikai/yii-mailer

YiiMailer is a mail extensions based on Yii Framework

Installs: 52

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 3

Forks: 4

Open Issues: 0

Type:yii-extension

v1.0 2013-05-15 06:53 UTC

This package is not auto-updated.

Last update: 2024-04-23 01:24:36 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);