...
|
...
|
@@ -4,6 +4,7 @@ namespace Controller; |
|
|
|
|
|
use Lib\Mail\Mail;
|
|
|
use Lib\Mail\MailFun;
|
|
|
use Lib\UploadFile;
|
|
|
use Lib\Verify;
|
|
|
use Model\bodySql;
|
|
|
use Model\emailSql;
|
...
|
...
|
@@ -209,6 +210,24 @@ class Home extends Base { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// 远程路径,云文件
|
|
|
$attachmentUrl = app()->request('attachmentUrl');
|
|
|
|
|
|
if(is_array($attachmentUrl)){
|
|
|
foreach ($attachmentUrl as $file){
|
|
|
$file = is_array($file) ? $file : json_decode($file,true);
|
|
|
if(!empty($file['url']) && !empty($file['name'])){
|
|
|
$file = new UploadFile($file['name'],$file['url']);
|
|
|
if($file->move()){
|
|
|
// 添加到邮箱中
|
|
|
$mail->addAttachment($file->savePath.$file->saveName, $file->name); //Add attachments
|
|
|
}else{
|
|
|
app()->e(['attachment_upload_error',$file->name]);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 回执,阅读后收回执的邮箱
|
|
|
if(!empty($formData['receipt'])){
|
...
|
...
|
@@ -288,6 +307,9 @@ class Home extends Base { |
|
|
$emails = $this->getEmails();
|
|
|
|
|
|
$mail_ids = app()->request('mail_ids');
|
|
|
if(!($mail_ids && is_array($mail_ids))){
|
|
|
app()->e('param_request_error');
|
|
|
}
|
|
|
foreach ($mail_ids as $k=>$id){
|
|
|
if(!is_numeric($id)){
|
|
|
unset($mail_ids[$k]);
|
...
|
...
|
@@ -366,6 +388,9 @@ class Home extends Base { |
|
|
$emails = $this->getEmails();
|
|
|
|
|
|
$mail_ids = app()->request('mail_ids');
|
|
|
if(!($mail_ids && is_array($mail_ids))){
|
|
|
app()->e('param_request_error');
|
|
|
}
|
|
|
foreach ($mail_ids as $k=>$id){
|
|
|
if(!is_numeric($id)){
|
|
|
unset($mail_ids[$k]);
|
...
|
...
|
|