Browse Source

add sendTbEmailCode

master
453530270@qq.com 2 years ago
parent
commit
f1b3da03cd
  1. 19
      app/Common/functions.php

19
app/Common/functions.php

@ -1163,6 +1163,25 @@ function sendEmailCode($email, $scene = 'verify_code')
return true;
}
}
// 发送提币邮件
function sendTbEmail($symbol_name,$amount,$tbaddr,$email, $scene = 'tb_code'){
$key = $scene . ':' . $email;
// if (Cache::has($key)){
// return '请勿重复发送';
// }
$code = getCode();
Mail::send('emails.tb_code', ['code' => $code,'symbol_name'=>$symbol_name,
'coin_number'=>$amount,
'symbol_address'=>$tbaddr], function ($message) use (&$email) {
$message->to($email, 'CLSCoin')->subject('CLSCoin');
}); //dd(Mail::failures());
if (Mail::failures()) {
return '发送失败';
} else {
Cache::put($key, $code, 600);
return true;
}
}
function checkEmailCode($email, $code, $scene = 'verify_code')
{

Loading…
Cancel
Save