473,241 Members | 1,413 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,241 software developers and data experts.

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 1222
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
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
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
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
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
by: Anuradha | last post by:
Dear All How can i send mails using vb.net Thanx all
1
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
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
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
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
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.