1
This commit is contained in:
@@ -5,6 +5,7 @@ namespace app\api\controller;
|
||||
use think\Controller;
|
||||
use think\Db;
|
||||
use think\Queue;
|
||||
use think\Env;
|
||||
use think\Validate;
|
||||
|
||||
class Email extends Controller
|
||||
@@ -192,6 +193,46 @@ class Email extends Controller
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function pushEmailForBMEC(){
|
||||
// $a = readExcel("/home/wwwroot/api.tmrjournals.com/public/system/1.xlsx");
|
||||
// $a = readExcel("D:/1.xlsx");
|
||||
|
||||
$a[] = ["wangjinlei","testtesttest","13662001490@126.com"];
|
||||
$a[] = ["wangjinlei1","testtesttest1","751475802@qq.com"];
|
||||
|
||||
|
||||
|
||||
$journal_info = $this->journal_obj->where("journal_id",23)->find();
|
||||
// $email = "1300364247@qq.com";
|
||||
// $email = "751475802@qq.com";
|
||||
|
||||
foreach ($a as $k=>$v){
|
||||
$content = "Dear Dr. ".trim($v['0']).",<br/><br/>";
|
||||
$content .= 'We recently read your article "'.trim($v[1]).'", and we consider your research interests and expertise to be aligned well with the scope of the journal Biomedical Engineering Communications(https://www.tmrjournals.com/bmec/).<br/><br/>';
|
||||
$content .= "Thus, on behalf of the editorial team of BMEC, we would like to invite you to publish a feature paper in BMEC, and please note that standard article processing charge of 0 CHF.<br/><br/>";
|
||||
$content .= "If you plan to contribute, please kindly send us a short abstract via e-mail in advance.<br/><br/>";
|
||||
$content .= "Biomedical Engineering Communications (ISSN: 2815-9063) is a peer-reviewed, open-access journal managed by TMR Publishing Group. Biomedical engineering is an interdisciplinary discipline that combines the principles of physics, chemistry, mathematics, computer and engineering, to study biomedicine and develop innovative biological products, materials, processing methods, implants, devices and informatics.<br/><br/>";
|
||||
$content .= "The aim of Biomedical Engineering Communications is to promote the integration of new technologies, new ideas, new methods and life sciences in the field of engineering, and to enhance the digitization, automation and intelligence of biomedical engineering technology.<br/><br/>";
|
||||
$content .= "You may find more information about the journal, including the editorial board and Special Issues, at https://www.tmrjournals.com/bmec/<br/><br/>";
|
||||
$content .= "If you have any questions, please feel free to contact me.<br/><br/>We look forward to hearing from you.<br/>Best regards,<br/>Aubree zhu<br/>Journal Editor<br/>WeChat: 15620305727<br/><br/>";
|
||||
$content .= "Recruiting reviewers<br/>https://submission.tmrjournals.com/reviewer<br/><br/>Biomedical Engineering Communications<br/>Email: bmec@tmrjournals.com<br/>Website: https://www.tmrjournals.com/bmec/<br/>";
|
||||
$pre = Env::get('emailtemplete.pre');
|
||||
$net = Env::get('emailtemplete.net');
|
||||
$net1 = str_replace("{{email}}",trim($v[2]),$net);
|
||||
$mailbody=$pre.$content.$net1;
|
||||
|
||||
$edata['email'] = trim($v[2]);
|
||||
$edata['title'] = "[Biomedical Engineering Communications] Invitation for More Cooperation Without Free";
|
||||
$edata['content'] = $mailbody;
|
||||
$edata['tmail'] = $journal_info['email'];
|
||||
$edata['tpassword'] = $journal_info['epassword'];
|
||||
Queue::push('app\api\job\mail@fire', $edata, "tmail");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function lsPushEmail()
|
||||
{
|
||||
// $journal_info = $this->journal_obj->where("journal_id", 4)->find();
|
||||
|
||||
@@ -5,6 +5,7 @@ use think\Db;
|
||||
use think\Env;
|
||||
use think\Cache;
|
||||
|
||||
|
||||
//use TCPDF;
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
@@ -23,6 +24,24 @@ function authcode($str)
|
||||
return md5($key . $str1);
|
||||
}
|
||||
|
||||
|
||||
function readExcel($file){
|
||||
// 读取Excel文件
|
||||
$objPHPExcel = PHPExcel_IOFactory::load($file);
|
||||
|
||||
// 获取表格中的数据
|
||||
$sheet = $objPHPExcel->getSheet(0); // 获取第一个工作表
|
||||
$highestRow = $sheet->getHighestRow(); // 取得总行数
|
||||
$highestColumn = $sheet->getHighestColumn(); // 取得总列数
|
||||
|
||||
$dataset = [];
|
||||
for ($row = 1; $row <= $highestRow; $row++) {
|
||||
$rowData = $sheet->rangeToArray('A' . $row . ':' . $highestColumn . $row, NULL, TRUE, FALSE);
|
||||
array_push($dataset, $rowData[0]);
|
||||
}
|
||||
return $dataset;
|
||||
}
|
||||
|
||||
/**
|
||||
* @function sendEmail
|
||||
* @intro 发送邮件(带附件)
|
||||
|
||||
Reference in New Issue
Block a user