From 82a60327e55a4ee39c362335579afe1e125c11db Mon Sep 17 00:00:00 2001 From: wangjinlei <751475802@qq.com> Date: Thu, 9 Feb 2023 17:56:16 +0800 Subject: [PATCH] 1 --- .env | 2 +- application/common.php | 3 ++- application/master/controller/Journal.php | 21 ++++++++++++--------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.env b/.env index 7d5a101..77fa783 100644 --- a/.env +++ b/.env @@ -162,7 +162,7 @@ net = '
- This email was sent to tmr@tmrjournals.com and is specific to the recipient. + This email was sent to {{email}} and is specific to the recipient. If you have received this email in error please delete it and notify the sender immediately.
diff --git a/application/common.php b/application/common.php
index 84f93d6..3599ab0 100644
--- a/application/common.php
+++ b/application/common.php
@@ -350,7 +350,8 @@ function aliemail($email,$title,$content){
//组合邮件公共样式
$pre = Env::get('emailtemplete.pre');
$net = Env::get('emailtemplete.net');
- $mailbody=$pre.$content.$net;
+ $net1 = str_replace("{{email}}",$email,$net);
+ $mailbody=$pre.$content.$net1;
$smtpserver = "smtpdm-ap-southeast-1.aliyun.com";
$smtpserverport = 80;
$smtpusermail = "propa@hellotmr.top";
diff --git a/application/master/controller/Journal.php b/application/master/controller/Journal.php
index bed9fff..89d4340 100644
--- a/application/master/controller/Journal.php
+++ b/application/master/controller/Journal.php
@@ -918,30 +918,33 @@ class Journal extends Controller
if(!$rule->check($data)){
return jsonError($rule->getError());
}
- $url = "http://api.tmrjournals.com/public/index.php/api/Auto/qqqq";
+ $url = "http://api.tmrjournals.com/public/index.php/api/Auto/getUserqqqq";
$pag = [];
$pag['num'] = $data['num'];
$res = object_to_array(json_decode(myPost($url, $pag)));
- $tt = "Dear researchers in liver cancer,
";
- $tt .= 'I am pleased to promote a new paper published in our journal to you. The paper is titled "A Comprehensive Review of Research Progress in Chinese Medicines for Primary Liver Cancer Treatment", and is available on doi.org: 10.53388/TMR20220207263.
';
- $tt .= 'download PDF
';
- $tt .= 'This study summarizes the common monomial Chinese herbal medicines and their components and formulae. It also investigates the proprietary Chinese medicines used to treat primary liver cancer and reviews the clinical trial-based literature of Chinese herbal medicines associated with liver cancer treatment. The results confirmed the safety and efficacy of traditional Chinese medicine (TCM) in liver cancer treatment.
';
- $tt .= 'We believe that this paper will be helpful to your research work and provide you with valuable references.
Thank you for your attention and we hope to stay in touch.
Sincerely,
Editor-Nuoxi Pi
Traditional Medicine Research';
+ // $tt = "
";
- // $ll = ['751475802@qq.com','849192806@qq.com'];
+ $ll = ['751475802@qq.com','849192806@qq.com'];
foreach($res['data']['list'] as $v){
// foreach($ll as $v){
+ $img = '';
+ if($v['country']=='China'){
+ $img = "27bbc43fce9be5a73719994532f4094.png";
+ }else{
+ $img = "8e01a16577638c35ec6c1848b209e12.png";
+ }
+ $tt = "
";
$maidata['email'] = $v['email'];
// $maidata['email'] = $v;
- $maidata['title'] = "New study on Chinese medicines for liver cancer treatment";
+ $maidata['title'] = "Call for papers | Traditional Medicine Research";
$maidata['content'] = $tt;
Queue::push('app\api\job\mail@propa', $maidata, "mail");
}
- return jsonSuccess([]);
+ return jsonSuccess($res);
}
public function pushEmailToUser(){