目前我正在製作一個系統來跟蹤我的電子郵件,但我不希望顯示原始郵件。獲取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中,也有很多其他的電子郵件客戶端,並等等,任何人都可以幫忙?