我有一個主題行發送電子郵件作爲如何解碼電子郵件中的主題?
[BILLING #PHY-945-49853]: [Ticket #12622] Payment Method
但在消息的源行是像下面
Subject: =?UTF-8?B?W1NBTEVTICNCQk4tOTM1LTM3OTE3XTogW1RpY2tldCAjMTI2MjJdIFBheW1lbnQ=?=
=?UTF-8?B?IE1ldGhvZA==?=
它以Base64編碼。我如何使用php將它解碼回原來的主題行?我已經嘗試使用php base64_decode($subject)
,但它不會將其解碼爲原始主題([BILLING#PHY-945-49853]:[Ticket#12622] Payment Method)
我還附加了一封示例電子郵件消息:
Return-Path: .........
X-Original-To: ..........
Delivered-To: ........
Received: ......
X-DKIM: ........
Received:....
To: ....
Subject: =?UTF-8?B?W1NBTEVTICNCQk4tOTM1LTM3OTE3XTogW1RpY2tldCAjMTI2MjJdIFBheW1lbnQ=?=
=?UTF-8?B?IE1ldGhvZA==?=
From: =?UTF-8?B?U0FWVllFSE9TVElORyBTQUxFUw==?=
X-Priority: ..
X-MSMail-Priority: normal
X-MimeOLE: Produced By Kayako Fusion v4.01.204
X-Mailer: Kayako Fusion v4.01.204
Reply-To: .......
Date: .....
Content-Type: multipart/alternative;
boundary="=_1.64496c432f57488924404b338155a2d7"
MIME-Version: 1.0
Message-Id: ....
這是一條MIME格式的消息。如果你看到這個,你的郵件閱讀器不支持這種格式。
--=_1.64496c432f57488924404b338155a2d7
Content-Type: text/plain;
charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
------------------------------------------------------
Support Center:
Content-Type: text/html;
charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
相關[meta post](http://meta.stackoverflow.com/q/291879/55075)。 – kenorb 2015-05-02 15:01:54