diff --git a/app/Common/functions.php b/app/Common/functions.php index de3bcb5..53de285 100644 --- a/app/Common/functions.php +++ b/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') {