1
This commit is contained in:
@@ -50,47 +50,47 @@ class Inbox extends Controller{
|
||||
|
||||
$insertData=[];
|
||||
|
||||
foreach ($emailNums as $key=>$value){
|
||||
// foreach ($emailNums as $key=>$value){
|
||||
|
||||
//2.1 获取邮件头部信息
|
||||
$head = $server->getHeaders($value);
|
||||
// //2.1 获取邮件头部信息
|
||||
// $head = $server->getHeaders($value);
|
||||
|
||||
//2.2 处理邮件附件
|
||||
$files = $server->getAttach($value);
|
||||
// 附件
|
||||
$head['url'] =[];
|
||||
// //2.2 处理邮件附件
|
||||
// $files = $server->getAttach($value);
|
||||
// // 附件
|
||||
// $head['url'] =[];
|
||||
|
||||
//2.3 处理正文中的图片
|
||||
$imageList=array();
|
||||
$section = 2;
|
||||
if($files){
|
||||
foreach($files as $k => $file)
|
||||
{
|
||||
// //2.3 处理正文中的图片
|
||||
// $imageList=array();
|
||||
// $section = 2;
|
||||
// if($files){
|
||||
// foreach($files as $k => $file)
|
||||
// {
|
||||
|
||||
//type=1为附件,0为邮件内容图片
|
||||
if($file['type'] == 0)
|
||||
{
|
||||
$imageList[$k]=$file['pathname'];
|
||||
}
|
||||
// //type=1为附件,0为邮件内容图片
|
||||
// if($file['type'] == 0)
|
||||
// {
|
||||
// $imageList[$k]=$file['pathname'];
|
||||
// }
|
||||
|
||||
if($file['type'] == 1)
|
||||
{
|
||||
array_push($head['url'],$file['url']);
|
||||
}
|
||||
// if($file['type'] == 1)
|
||||
// {
|
||||
// array_push($head['url'],$file['url']);
|
||||
// }
|
||||
|
||||
if(($file['type'] == 0 || $file['type'] == 1) && !empty($file['url'])){
|
||||
// if(($file['type'] == 0 || $file['type'] == 1) && !empty($file['url'])){
|
||||
|
||||
$section = 1.2 ;
|
||||
}
|
||||
// $section = 1.2 ;
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
// }
|
||||
|
||||
$webPath = ROOT_PATH.'public' . DS . 'contentImg' . DS . date('Ymd') .DS ;
|
||||
// 正文内容
|
||||
$head['content'] = $server->getBody($value,$webPath,$imageList,$section);
|
||||
array_push($insertData,$head);
|
||||
}
|
||||
// $webPath = ROOT_PATH.'public' . DS . 'contentImg' . DS . date('Ymd') .DS ;
|
||||
// // 正文内容
|
||||
// $head['content'] = $server->getBody($value,$webPath,$imageList,$section);
|
||||
// array_push($insertData,$head);
|
||||
// }
|
||||
$this->insertData($insertData,$journal);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user