Re: Putting a line feed in an email
| From: | Brent Baisley | Date: | Mon, 27 Sep 2004 16:21:57 +0000 |
| Subject: | Re: Putting a line feed in an email | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-197973@lists.php.net to get a copy of this message | ||
That's actually an HTML problem rather than something with PHP, which would allow the \n \r in the mail() function. You are creating a URL, so you need to escape your characters just as you would with a regular URL. I would try enclosing your mailto link in the php urlencode() function. See if that works.
On Sep 27, 2004, at 12:05 PM, Brian Dunning wrote:
Hey all - I'm sending a regular text email with a mailto:link like this: <?php $subject = 'My Email Subject'; $body = 'My Email body'; echo "<a href=\"mailto:?subject=$subject&body=$body\">"; ?> I want the $body to contain some line feeds mixed in with the text. I've tried putting \n, \r, and things like that in there, but they just display in the text. Anyone know a way I can do this? I'm using the mailto: method for its simplicity and client-side nature, because I want their email program to be responsible for servers, bouncing, etc. Thanks, - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577