...
|
...
|
@@ -35,7 +35,7 @@ class MailFun { |
|
|
*/
|
|
|
public static function decodeMimeStr($string, $charset = 'utf-8') {
|
|
|
$newString = '';
|
|
|
$elements = imap_mime_header_decode($string);
|
|
|
$elements = \imap_mime_header_decode($string);
|
|
|
// print_r($elements);
|
|
|
for($i = 0; $i < count($elements); $i++) {
|
|
|
if($elements[$i]->charset == 'default') {
|
...
|
...
|
@@ -60,19 +60,19 @@ class MailFun { |
|
|
|
|
|
/**
|
|
|
* 验证是否有附件 BODYSTRUCTURE值
|
|
|
* @param array $BODYSTRUCTURE
|
|
|
* @param $BODYSTRUCTURE
|
|
|
* @return int
|
|
|
* @author:dc
|
|
|
* @time 2022/11/1 10:57
|
|
|
*/
|
|
|
public static function isFile(array $BODYSTRUCTURE):int {
|
|
|
public static function isFile($BODYSTRUCTURE):int {
|
|
|
// foreach ($BODYSTRUCTURE as $item){
|
|
|
// if($item[0] === 'APPLICATION'){
|
|
|
// return 1;
|
|
|
// }
|
|
|
// }
|
|
|
// return 0;
|
|
|
$json = json_encode($BODYSTRUCTURE);
|
|
|
$json = is_array($BODYSTRUCTURE) ? json_encode($BODYSTRUCTURE) : $BODYSTRUCTURE;
|
|
|
return strpos($json,'"attachment"')!==false;
|
|
|
}
|
|
|
|
...
|
...
|
|