Wednesday 15 June 2011

How to Send proper html data to iphone from php? -


I am sending mail content on iPhone mobile using the Cakephp function. Mail successfully sends over the iPhone, but the content they receive is in uneven format.

Examination: My Contents

  Username: Instruction Date: 2013-06-20 04:46:40 Email: siddesh@bhalke.com Type: Seller File Name : Xlsfile File type: xls Uploaded: Primary User Download: [download]   

My code:

   
  Username: Instruction Date: 2013-06-20 04:46:40 Email: Siddhadesh @ Bhalike type: vendor File name: xlsfile File type: xls Uploaded: Primary user download: [download]   

But it has received the format as an iPhone: SUBJ: test-failed file

  MSG: An ¿¿¿¿¿(Con't) 2 of 6 (Con't 6) 3 Username: Rajesh: 2013-06-17 10: 05: 14 Email : Sid @ R (Con't) 6 out of 4 mygroup.comType: MyFile Name: Simple Type: xls Uploaded: Sid Black Connection Connection (Con't) 6 of 5 You, test.com by A-A-Copyright 2013 test. All rights reserved. Info@test.com www.test.com   

Send mail function ..!

  function sendmail ($ template = null, $ to_email = null, $ from_email = null, $ subject = null, $ contents = array ()) {$ from_email = Configure :: read (' Site.support_email '); $ Bcc_email = Configure: Read ('site.developers_email'); $ Email = new kemmail (); $ $ = $ Email- & gt; Template ($ template, 'default') - & gt; Email format ('html') - & gt; From ($ to_email) - & gt; BCC ($ bcc_email) - & gt; From ($ to_email) - & gt; Subject ($ subject) - & gt; VisualWare ($ content); If ($ email- & gt; send ('default')) {$ this- & gt; Log ('to email:'. $ To_email. 'Topic:'. $ Theme); Back true; } return false; }   

To send the above format data, I used the normal p and br tag but in the data shown on the iPhone Not a proper format and some unnecessary data are sent with it

Can anyone help me with it?

Send mail as HTML, instead of text in this way:

  // Send as 'html', 'text' or 'both' (default is 'text') $ the-> Email-> SendAs = 'both';    

No comments:

Post a Comment