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查看?