473,503 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sending Information to an email - but need new lines..

Hi there.

Basically, I need to send some details but be able to use new lines.
Before we were using asp, which used VbCrLf but now that im writing
the pages in PHP we need another way.

a code sample is:

$details =
"------------------------------------------------------------------------------"
.. '<br />' .
"WEBSITE RESPONSE - PACK REQUEST" . '<br>' .
"------------------------------------------------------------------------------"
.. '<br>' .'<br>' .

which should then look similar to:

------------------------------------------------------------------------------
WEBSITE RESPONSE - PACK REQUEST
------------------------------------------------------------------------------

when the email gets sent to the address, but at the moment, its being
sent through as:

------------------------------------------------------------------------------<br>WEBSITE
RESPONSE - SAMPLE PACK
REQUEST<br>------------------------------------------------------------------------------<br><br><strong>NEW


Now is this just because the email client (im testing with yahoo)
doesnt support html? or another reason.

Any ideas how i can fix this issue please.

Regards and thanks for the help

Sep 18 '06 #1
3 1228
It looks like you are not sending the email in "text/plain" instead of
"text/html". If you send it in "text/html" you will get your desired
results, if you want to send it in "text/plain" you will have to
replace your "<br />"'s with "\n\r" to signal a carriage return.

Advo wrote:
Hi there.

Basically, I need to send some details but be able to use new lines.
Before we were using asp, which used VbCrLf but now that im writing
the pages in PHP we need another way.

a code sample is:

$details =
"------------------------------------------------------------------------------"
. '<br />' .
"WEBSITE RESPONSE - PACK REQUEST" . '<br>' .
"------------------------------------------------------------------------------"
. '<br>' .'<br>' .

which should then look similar to:

------------------------------------------------------------------------------
WEBSITE RESPONSE - PACK REQUEST
------------------------------------------------------------------------------

when the email gets sent to the address, but at the moment, its being
sent through as:

------------------------------------------------------------------------------<br>WEBSITE
RESPONSE - SAMPLE PACK
REQUEST<br>------------------------------------------------------------------------------<br><br><strong>NEW


Now is this just because the email client (im testing with yahoo)
doesnt support html? or another reason.

Any ideas how i can fix this issue please.

Regards and thanks for the help
Sep 18 '06 #2

Nick DeNardis wrote:
It looks like you are not sending the email in "text/plain" instead of
"text/html". If you send it in "text/html" you will get your desired
results, if you want to send it in "text/plain" you will have to
replace your "<br />"'s with "\n\r" to signal a carriage return.

ahh i didnt realise you had to send differently for html.. is there a
certain parameter you have to pass or?

Sep 18 '06 #3
http://us2.php.net/manual/en/function.mail.php

Check out Example 4.

Advo wrote:
Nick DeNardis wrote:
It looks like you are not sending the email in "text/plain" instead of
"text/html". If you send it in "text/html" you will get your desired
results, if you want to send it in "text/plain" you will have to
replace your "<br />"'s with "\n\r" to signal a carriage return.


ahh i didnt realise you had to send differently for html.. is there a
certain parameter you have to pass or?
Sep 18 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2951
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text...
8
1751
by: Elliot M. Rodriguez | last post by:
I am having a heckuva time debugging this, or determining why my page is behaving this way. I have a search form, that when completed, returns a datagrid. When the user selects a row (normal...
6
1388
by: Rani | last post by:
hi guys I need to send an email from a form the form is collecting data from a user and then submits it to us. I would like the email to appear in the following format Name: Email: Etc. all I...
9
3195
by: B-Dog | last post by:
I've built a small app that sends mail through our ISP's SMTP server but when I try to send through my local exchange server I get CDO error. Does webmail use SMTP or does it strictly rely on...
6
2715
by: Anuradha | last post by:
Dear All How can i send mails using vb.net Thanx all
1
8154
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
9
3433
by: JoeP | last post by:
Hi All, How can I find the reason for such an error: Failure sending mail. Some Code... oMailMessage.IsBodyHtml = False oMailMessage.Body = cEmailBody Dim oSMTP As New SmtpClient...
7
3314
by: bleachie | last post by:
Hey, I just need some help, my form seems to not send me all of the 'guestNames' and 'guestEmails' forms. i use this function to add more guestnames and guestemail fields based on the number of...
10
5040
by: Markgoldin | last post by:
I am sending an XML data from not dontnet process to a .Net via socket listener. Here is a data sample: <VFPData> <serverdata> <coderun>updateFloor</coderun> <area>MD2</area>...
0
7093
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...
0
7287
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,...
0
7353
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...
0
7468
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...
0
5596
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5023
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...
0
4689
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...
0
3180
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...
1
747
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.