PHP Class MailModel, thinksns

Copyright (c) 2013 http://www.WanPin123_OA.com All rights reserved. Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) Author: jinzhu.yin Support: https://git.oschina.net/WanPin123_OA/WanPin123_OA -------------------------------------------------------------------------
Inheritance: extends CommonModel
ファイルを表示 Open project: medz/thinksns-4 Class Usage Examples

Public Properties

Property Type Description
$allowed 允许发送邮件的类型
$message

Public Methods

Method Description
__construct ( ) 初始化方法,加载phpmailer,初始化默认参数
send_email ( string $sendto_email, string $subject, string $body, array $senderInfo = '' ) : boolean 发送邮件
setMessage ( $message )
test_email ( array $data ) : boolean 测试发送邮件

Method Details

__construct() public method

初始化方法,加载phpmailer,初始化默认参数
public __construct ( )

send_email() public method

发送邮件
public send_email ( string $sendto_email, string $subject, string $body, array $senderInfo = '' ) : boolean
$sendto_email string 收件人的Email
$subject string 主题
$body string 正文
$senderInfo array 发件人信息 array('email_sender_name'=>'发件人姓名', 'email_account'=>'发件人Email地址')
return boolean 是否发送邮件成功

setMessage() public method

public setMessage ( $message )

test_email() public method

测试发送邮件
public test_email ( array $data ) : boolean
$data array 邮件相关内容数据
return boolean 是否发送成功

Property Details

$allowed public_oe static_oe property

允许发送邮件的类型
public static $allowed

$message public_oe property

public $message