\app\common\libraryEms

Summary

Methods
Properties
Constants
get()
send()
notice()
check()
flush()
No public properties found
No constants found
No protected methods found
$expire
$maxCheckNums
N/A
No private methods found
No private properties found
N/A

Properties

$expire

$expire : int

验证码有效时长

Type

int

$maxCheckNums

$maxCheckNums : int

最大允许检测的次数

Type

int

Methods

get()

get(int  $email, string  $event = 'default') : \app\common\library\Ems

获取最后一次邮箱发送的数据

Parameters

int $email

邮箱

string $event

事件

Returns

\app\common\library\Ems —

send()

send(int  $email, int  $code = null, string  $event = 'default') : bool

发送验证码

Parameters

int $email

邮箱

int $code

验证码,为空时将自动生成4位数字

string $event

事件

Returns

bool —

notice()

notice(mixed  $email, string  $msg = '', string  $template = null) : bool

发送通知

Parameters

mixed $email

邮箱,多个以,分隔

string $msg

消息内容

string $template

消息模板

Returns

bool —

check()

check(int  $email, int  $code, string  $event = 'default') : bool

校验验证码

Parameters

int $email

邮箱

int $code

验证码

string $event

事件

Returns

bool —

flush()

flush(int  $email, string  $event = 'default') : bool

清空指定邮箱验证码

Parameters

int $email

邮箱

string $event

事件

Returns

bool —