This commit is contained in:
wangjinlei
2023-02-09 17:56:16 +08:00
parent 333a5f9ca7
commit 82a60327e5
3 changed files with 15 additions and 11 deletions

2
.env
View File

@@ -162,7 +162,7 @@ net = '</p>
<tr style="font-family:sans-serif; vertical-align: top;font-size: 12px;">
<td width="750" height="40" colspan="0" rowspan="0">
<p style="margin: 5px 30px 10px 30px;line-height: 20px">
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.
</p>
<p style="margin: 0 30px 10px 30px;line-height: 20px">

View File

@@ -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";

View File

@@ -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,<br/><br/>";
$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: <a href="https://doi.org/10.53388/TMR20220207263">10.53388/TMR20220207263</a>.<br/><br/>';
$tt .= '<a href="https://www.tmrjournals.com/public/articlePDF/20220727/article.pdf">download PDF</a><br/><br/>';
$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.<br/><br/>';
$tt .= 'We believe that this paper will be helpful to your research work and provide you with valuable references.<br/><br/>Thank you for your attention and we hope to stay in touch.<br/><br/>Sincerely,<br/><br/>Editor-Nuoxi Pi<br/>Traditional Medicine Research';
// $tt = "<img src='https://www.tmrjournals.com/public/sql/8e01a16577638c35ec6c1848b209e12.png' style='width:688px;'></img><br/><br/>";
// $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 = "<img src='https://www.tmrjournals.com/public/sql/".$img."' style='width:688px;'></img><br/><br/>";
$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(){