邮件修改
This commit is contained in:
@@ -4,6 +4,8 @@ namespace app\api\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\Db;
|
||||
use think\Env;
|
||||
use think\Queue;
|
||||
|
||||
class Special extends Controller {
|
||||
|
||||
@@ -68,11 +70,23 @@ class Special extends Controller {
|
||||
$inser_data['phone'] = $data['phone'];
|
||||
$inser_data['realname'] = $data['realname'];
|
||||
$inser_data['ctime'] = time();
|
||||
$this->user_obj->insert($inser_data);
|
||||
$id = $this->user_obj->insertGetId($inser_data);
|
||||
//发送注册成功邮件
|
||||
$tt = "Dear author,You have successfully registered<br><br>";
|
||||
$content = $tt . '<p>Username:' . $account . '<br>Password:' . $data['password'] . '</p>';
|
||||
sendEmail($email, 'Dear ' . $data['realname'], 'TMR', $content,);
|
||||
|
||||
$sendUser=[
|
||||
'title'=>'Dear ' . $data['realname'], // 邮件标题
|
||||
'content'=>$content,//邮件内容
|
||||
'user_id'=>$id, //收件人ID
|
||||
'email'=>$email,// 收件人邮箱
|
||||
'journal_id'=>0, // 期刊ID
|
||||
'sendEmail'=>Env::get('email.send_email'), // 期刊邮箱
|
||||
'sendPassword'=>Env::get('email.send_email_password'), // 期刊密码
|
||||
'from_name'=>'TMR'
|
||||
];
|
||||
Queue::push('app\api\job\domail@fire',$sendUser,'domail');
|
||||
// sendEmail($email, 'Dear ' . $data['realname'], 'TMR', $content);
|
||||
return json($inser_data);
|
||||
}
|
||||
|
||||
@@ -243,7 +257,18 @@ class Special extends Controller {
|
||||
$editor_info = $this->user_obj->where('user_id', $journal_info['editor_id'])->find();
|
||||
$tt = 'Dear editor,<br>';
|
||||
$tt .= 'Please check the new manuscript in the submission system.';
|
||||
sendEmail($editor_info['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
|
||||
// sendEmail($editor_info['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
|
||||
$sendEditor=[
|
||||
'title'=>$journal_info['title'], // 邮件标题
|
||||
'content'=>$tt,//邮件内容
|
||||
'user_id'=>$journal_info['editor_id'], //收件人ID
|
||||
'email'=>$editor_info['email'],// 收件人邮箱
|
||||
'journal_id'=>$journal_info['journal_id'], // 期刊ID
|
||||
'sendEmail'=>$journal_info['email'], // 期刊邮箱
|
||||
'sendPassword'=>$journal_info['epassword'], // 期刊密码
|
||||
'from_name'=>$journal_info['title']
|
||||
];
|
||||
Queue::push('app\api\job\domail@fire',$sendEditor,'domail');
|
||||
|
||||
//增加用户操作log
|
||||
$log_data['user_id'] = $user_res['user_id'];
|
||||
|
||||
Reference in New Issue
Block a user