473,795 Members | 2,805 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Line Feed Problem for SMS email message

32 New Member
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 4823
pbmods
5,821 Recognized Expert Expert
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
2217
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. (Hex 0d0a). My filter adds the header in the correct format, including the entire encrypted cookie value (set-cookie: mycookie=theEncryptedValue;path=/;). However, when the isapi filter finishes running, the browser only gets part of the...
4
2824
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 jumped to only when the defined group changes. Robert
5
67935
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 html email), I need to put tabs in between columns of data and then line feeds after each row. How can I do this? Right now I'm doing "\t" for tab and "\r\n" for line feed, but when I generate the text, those characters actually come out in the...
2
4562
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 (i.e. /n, /r). The expression that I'm looking for uses the dot operator (.) (i.e. classname.property). Perhaps this will help to explain what I'm looking for: I want to fill in the "blank" in the line below.
1
2255
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 white space it wont give a new line but when feed a white space it give an automaic new line :- <DIV id=HTMLEditor dir="ltr" contentEditable=true style="BORDER-RIGHT: #1979e1 1px groove; BORDER-TOP: #1979e1 1px groove; VERTICAL-ALIGN: middle;...
3
2042
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
27832
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 system and some of them have an extra carriage return and line feed at the end of them. This causes havoc when we sync between our ERP system and CRM system. If anyone knows a way to solve this problem the help would be appreciated. Examples:...
1
4115
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
10749
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 internet explorer, the complete contents of each tag displayed as an individual paragraph. I want to insert an line feed character into the tag. Displayed as : <answer>XML stands for EXtensible Markup Language.XML was designed to transport and store...
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10216
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10002
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7543
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.