Re: Re: More mail() questions.

From: Date: Tue, 26 Nov 2002 09:23:41 +0000
Subject: Re: Re: More mail() questions.
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-126064@lists.php.net to get a copy of this message
Try '\r\n' instead of '\n' regards, Ewout de Boer ----- Original Message ----- From: "Beauford.2002" <beauford.2002@rogers.com> To: <php-general@lists.php.net>; "Kyle Gibson" <admin@frozenonline.com> Sent: Tuesday, November 26, 2002 10:17 AM Subject: Re: [PHP] Re: More mail() questions. > Thanks for the reply, however, that will not work. The only line breaks you > may get with that are those layed out in a text box or from your mail > client. What if I have other variables that need to be put in the body of > the email. > > i.e. > > Age: 16 > Height: 168 > Weight: 120 > etc > etc > etc. > > These are variables that the user inputs into a form and need to be on a > seperate line, so if I did $message = "$age, $weight, $height, etc." they > would appear on the same line - I need to have them on separate lines. > > ----- Original Message ----- > From: "Kyle Gibson" <admin@frozenonline.com> > To: <php-general@lists.php.net> > Sent: Monday, November 25, 2002 10:54 PM > Subject: [PHP] Re: More mail() questions. > > > > > I am trying to get the message portion of the email to have line > breaks, > > > but whatever I do it displays on one line. This is what I have. > > > > > > $message = "1st Line\n"; > > > $message .= "2nd Line\n"; > > > $message .= "\n"; > > > $message .= "3rd Line\n"; > > > $message .= "\n"; > > > $message .= "4th Line\n"; > > > > > > mail ("", $subject, $message, $headers); > > > > > > TIA > > > > > > As far as I've encountered, you can simply do the following: > > > > <? > > > > $message = " > > This is the message I > > wish to send with linebreaks... > > > > > > > > all the way down here. > > "; > > > > > > mail ("", $subject, $message, $headers); > > > > ?> > > > > > > > > -- > > Kyle Gibson > > admin(at)frozenonline.com > > http://www.frozenonline.com/ > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >

« previous php.general (#126064) next »