切换导航条
此项目
正在载入...
登录
周海龙
/
mail-serve
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
邓超
about a year ago
提交
adbc9b312d65eb5319d21f2729cdc7f280381149
1 个父辈
848b248e
x
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
26 行增加
和
9 行删除
lib/Mail/Body.php
lib/Mail/Body.php
查看文件 @
adbc9b3
...
...
@@ -44,15 +44,8 @@ class Body {
$this
->
fileSavePath
=
$fileSavePath
;
// 这个是描述特殊文本
if
(
strpos
(
$body
,
'This is a multi-part message in MIME format.'
)
===
0
){
$body
=
trim
(
$body
,
'This is a multi-part message in MIME format.'
);
$body
=
trim
(
$body
);
}
if
(
strpos
(
$body
,
'This is a multipart message in MIME format.'
)
===
0
){
$body
=
trim
(
$body
,
'This is a multipart message in MIME format.'
);
$body
=
trim
(
$body
);
}
$body
=
$this
->
ltrimText
(
$body
);
// 163 有
if
(
strpos
(
$body
,
'------=_Part'
)
!==
false
){
...
...
@@ -106,6 +99,30 @@ class Body {
}
public
function
ltrimText
(
$body
){
$bodyMiaoSuText
=
[
'This is a multi-part message in MIME format.'
,
'This is a multipart message in MIME format.'
,
'This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.'
,
// 'This is a MIME message.'
];
foreach
(
$bodyMiaoSuText
as
$str
){
// 这个是描述特殊文本
if
(
strpos
(
$body
,
$str
)
===
0
){
$body
=
ltrim
(
$body
,
$str
);
$body
=
trim
(
$body
);
}
}
return
$body
;
}
/**
* 获取标签
* @param $body
...
...
请
注册
或
登录
后发表评论