目前我正在制作一个系统来跟踪我的电子邮件,但我不希望显示原始邮件。获取IMAP邮件的回复
有没有办法让IMAP只返回回复?不是全部(当你按回复任何电子邮件客户端的电子邮件时,它将原始电子邮件添加到底部)。或者通过PHP本身做到这一点?我现在有
$msg = nl2br($msg);
$msgs2 = explode("<br />", $msg);
//pre($msgs2);
foreach($msgs2 as $msg) {
if(strpos($msg, '> ') === false) $message .= "<br>".$msg;
}
return $message;
但是,如果你看一下原始的Gmail答复,它有东西ssuch作为HTML版本等。
> --f46d0442889037c1fc04b6c20955 Content-Type: text/plain; charset=ISO-8859-1
>
> fghjfghjfgh test test eteststs
>
> On Tue, Jan 17, 2012 at 11:35 PM, mm <
> mg.com> wrote:
>
> >
> > On 17 Jan 2012, at 05:56, mom wrote:
> >
> > > Another email hahahahqa!
> > > On 17 Jan 2012, at 05:47, mcom wrote:
> > >
> > >> Test message, higgins is very fat
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> Please do not edit below
> > >> *************************
> > >> S
> > >
> >
> >
>
>
> --
>
> --f46d0442889037c1fc04b6c20955 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
>
> fghjfghjfgh test test eteststs<br><br><div class=3D"gmail_quote">On
> Tue, Ja= n 17, 2012 at 11:35 PM, <a
> href=3D"mailto:maom">mm</a>
> <span dir=3D"ltr"><<a href=3D"mailto:mn=
> g.com">ma</a>></span> wrote:<br> <blockquote
> class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x
> #ccc solid;padding-left:1ex"><br> On 17 Jan 2012, at 05:56, <a href=3D"mailto:.com">mag.com</a>
> wrote:<br> <br> > Another email hahahahqa!<br> > On 17 Jan 2012,
> at 05:47, <a href=3D"mailto:.com">ma=
> na.com</a> wrote:<br> ><br> >> Test message,
> higgins is very fat<br> >><br> >><br> >><br>
> >><br> >><br> >> Please do not edit below<br>
> >> *************************<br> >> S<br> ><br> <br> </blockquote></div><br><br
> clear=3D"all"><div><br></div>-- <br>Regards,<div=
> >,</div><div>=A0</div><br>
>
> --f46d0442889037c1fc04b6c20955--
但是那只是Gmail中,也有很多其他的电子邮件客户端,并等等,任何人都可以帮忙?