Yii ~ send email, phpmailer

在yii底下用phpmailer


http://www.yiiframework.com/extension/phpmailer/

下載解壓縮到extensions

範例~

$mail = new JPhpMailer;
$mail -> IsSMTP();
$mail -> SMTPAuth = true;
$mail -> SMTPSecure = "ssl";
$mail -> Port = 465;
$mail -> Host = 'smtp.gmail.com';
$mail -> SMTPAuth = true;
$mail -> Username = 'ggggggggggg';
$mail -> Password = '12345678';
$mail -> SetFrom('ggggggggggg@gmail.com', 'aaaaaaaa');
$mail -> Subject = 'titleeeeeeeeeeeeeeee';
$mail -> MsgHTML('bodyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy');
$mail -> AddAddress('xxxxxxx@xxxxxxx.com');
$mail -> CharSet = "utf-8";
$mail -> Send();



reference
http://www.yiiframework.com/extension/phpmailer/

沒有留言:

發佈留言