1
我目前正在開發一個應用程序,通過電子郵件或彩信向用戶發送選定的優惠券。我遇到的問題是客戶收到MMS時顯示MMS。在Android上,圖像以視頻的形式顯示,而在iOS上,信息的一切都是錯誤的。帶CodeIgniter電子郵件類的彩信
這裏是正在發送的報頭的例子:
User-Agent: none
Date: Tue, 5 Mar 2013 10:45:12 -0500
From:
Return-Path:
Subject: =?utf-8?Q?Your_Requested_Coupon?=
To: ##########@txt.att.net
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: none
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="B_ATC_51361309002f2"
This is a multi-part message in MIME format.
Your email application may not support this format.
--B_ATC_51361309002f2
Content-Type: multipart/alternative; boundary="B_ALT_51361308f3595"
--B_ALT_51361308f3595
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
--B_ALT_51361308f3595
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
--B_ALT_51361308f3595--
--B_ATC_51361309002f2
Content-type: image/jpeg; name="promo3.jpg"
Content-Disposition: attachment;
Content-Transfer-Encoding: base64
....
IMAGE ENCODING HERE
....
--B_ATC_51361309002f2--
而且CI代碼:
$this->email->from('[email protected]');
$this->email->to('[email protected]_MESSAGE_CENTER.COM');
$this->email->subject('Your Requested Coupon');
$this->email->message($this->load->view('sms_email', '', TRUE));
$this->email->attach('/path/to/image.jpg'); //I've also tried passing a second param 'inline' to change the Content-Disposition to inline
有誰知道是否有可能使用內置的郵件類來完成這,還是我需要編寫特定的標題,使圖片信息正確顯示?
也有一個適當的消息格式爲MMS:文本或HTML?,有沒有一種適當的方式來附加圖像的iOS查看?