I am facing some problem while sending SMS and MMS email message to moble device using PHP and HTML.
MMS email message is displaying fine with proper linefeed.but SMS message is displaying without line feed.i heard SMS doesnot support HTML.but i attached '\r\n' to my SMS message.but its not working.
while i am receiving MMS in my mobile.i am receiving as HTML message.but in case of SMS,i am receiving as HTML message but not plain text message.i am little bit confused.Any one help me.
I attached my source code.
--------------------------------------
Expand|Select|Wrap|Line Numbers
- $plain_message = "this is the \r\n text message\r\n";
- $html_message = "this is \r\n<br/> HTML message\r\n<br/>";
- $headers = "From: Suresh<xxxx@...>\r\n";
- $headers .= "MIME-Version: 1.0\r\n"."Content-Type:
- multipart/alternative; boundary=\"123456\"\r\n";
- $message = "--123456\r\n"."Content-Type: text/plain;
- charset=\"UTF-8\"\r\n"."Content-Transfer-Encoding: 7bit \r\n";
- $message .= $plain_message."\r\n"; //plain text
- $message .= "--123456\r\n"."Content-Type: text/html;
- charset=\"UTF-8\"\r\n"."Content-Transfer-Encoding: 7bit \r\n";
- $message .= $html_message."\r\n";
- $message .= "--123456--\r\n";
- mail("xx@...","test",$message,$headers);// send email
A.suresh Kumar