473,386 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Line Feed Problem for SMS email message

Hello sir,
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
  1. $plain_message = "this is the \r\n text message\r\n";
  2.  
  3. $html_message = "this is \r\n<br/> HTML message\r\n<br/>";
  4.  
  5. $headers = "From: Suresh<xxxx@...>\r\n";
  6.  
  7. $headers .= "MIME-Version: 1.0\r\n"."Content-Type:
  8. multipart/alternative; boundary=\"123456\"\r\n";
  9.  
  10. $message = "--123456\r\n"."Content-Type: text/plain;
  11. charset=\"UTF-8\"\r\n"."Content-Transfer-Encoding: 7bit \r\n";
  12.  
  13. $message .= $plain_message."\r\n"; //plain text
  14.  
  15. $message .= "--123456\r\n"."Content-Type: text/html;
  16. charset=\"UTF-8\"\r\n"."Content-Transfer-Encoding: 7bit \r\n";
  17.  
  18. $message .= $html_message."\r\n";
  19.  
  20. $message .= "--123456--\r\n";
  21.  
  22. mail("xx@...","test",$message,$headers);// send email
  23.  
  24.  

A.suresh Kumar
Oct 24 '07 #1
1 4798
pbmods
5,821 Expert 4TB
Heya, Suresh.

Try sending the message only as plain text. You're not using any special formatting that would make HTML messaging necessary anyway.
Nov 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Neil S. | last post by:
I am writing an ISAPI filter which is using CAPICOM to encrypt and decrypt cookie information. I've found that the encryption string being returned by CAPICOM a has carriage control and line feed....
4
by: Robert | last post by:
Is there some way to suppress the automatic line feed in the detail section of a report in Access? I would like the detail to print out to the right of the existing one. The next line would be...
5
by: Mark | last post by:
I have a C# app that I am writing which is going to insert text into a table, which is then picked up by another program and emailed. On the text version of the email (when the user doesn't have...
2
by: Paul | last post by:
Hello, Could someone remind me of how to insert a line-feed/return character, please? I have used it before, but I can't recall what it is. What I'm looking for IS NOT an escape character...
1
by: Raed Sawalha | last post by:
Is it possible to make the following div to generate automatic line feed when user start writing and reaches the DIV bounderies like in textarea, the case I have when type a continous chars without...
3
by: howachen | last post by:
Consider the following program, how to make it work properly when a string contains line-feed? <?php $temp = "this is a \ntest"; print serialize($temp); ?>
4
by: whitej77777 | last post by:
I am trying to write a user defined function that will allow me to strip off the last carriage return and line feed from a text field. We have address fields stored in a text field for our ERP...
1
by: Nalaka | last post by:
Hi, We are sending SMS messages using our ASDP.net site (C# code).... How do I add a "Line Feed" character to the string that we are sending? Any help is deeply appreciated Thanks Nalaka
1
by: rengaraj | last post by:
Dear Experts, I am new to XML I want to create an Interview Questions Bank (Intra Net) for our institution. I preferred to store the Question & Answer in xml sheet. But if i vew the xml in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.