diff --git a/application/master/controller/Journal.php b/application/master/controller/Journal.php index adcf785..a613e81 100644 --- a/application/master/controller/Journal.php +++ b/application/master/controller/Journal.php @@ -813,6 +813,58 @@ class Journal extends Controller return jsonSuccess([]); } + /** + * 发送推广邮件到订阅者 + */ + public function pushEmailToDY(){ + + $frag = $this->subscribe_journal_obj->where('journal_id',1)->where('state',0)->limit(0,1000)->select(); + + $articles = $this->article_obj + ->field('j_article.*,j_journal_stage.stage_year,j_journal_stage.stage_vol,j_journal_stage.stage_no') + ->join('j_journal_stage', 'j_journal_stage.journal_stage_id = j_article.journal_stage_id', 'left') + ->where('j_article.journal_id',1) + ->where('j_article.journal_stage_id','<',375) + ->limit(20) + ->order('pdf_num desc')->select(); + $tt = 'Greetings!
'; + $tt .= 'Thank you for your attention to TMR Publishing Group and your active participation.

'; + $tt .= "According to Clarivate's latest policy (https://clarivate.com/news/clarivate-announces-changes-to-the-2023-journal-citation-reports/), Traditional Medicine Research (ISSN 2413-3973) will get the first Impact Factor in 2023. You are welcome to pay attention to the journal and submit manuscripts.

"; + $tt .= "Attached are some popular papers published in Traditional Medicine Research.

"; + $tt .= "You are always welcome to read and share the articles and encourage you to submit your manuscripts to us through the following channels: www.tmrjournals.com/tmr

"; + foreach($articles as $v){ + $tt .= "".$v['title']."
"; + $tt .= "Traditional Medicine Research. ".$v['stage_year']." ".$v['stage_vol']."(".$v['stage_no'].")
"; + $tt .= "Download pdf


"; + } + + $frag1 = []; + $frag1[] = [ + 'subscribe_journal_id'=>7, + 'email'=>'751475802@qq.com' + ]; + $frag1[] = [ + 'subscribe_journal_id'=>7, + 'email'=>'tmr@tmrjournals.com' + ]; + + foreach($frag as $v){ + $cache_tt = $tt.'Unsubscribe'; + $maidata['email'] = $v['email']; + $maidata['title'] = "Traditional Medicine Research will get the first Impact Factor (WOS) in 2023"; + $maidata['content'] = $cache_tt; + // $maidata['tmail'] = 'publicrelations@tmrjournals.com'; + // $maidata['tpassword'] = 'pRWU999999'; + // $maidata['tmail'] = 'ghr@tmrjournals.com'; + // $maidata['tpassword'] = 'Gh999666'; + // echo aliemail($maidata['email'], $maidata['title'], $maidata['content']); + Queue::push('app\api\job\mail@propa', $maidata, "mail"); + // sendEmail($maidata['email'],$maidata['title'],$maidata['title'],$maidata['content'],$maidata['tmail'],$maidata['tpassword']); + } + + return jsonSuccess([]); + } + /** * 发送邮件至审稿人 */