Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mailto format

Status
Not open for further replies.

sipps

Technical User
Feb 9, 2003
133
GB
Hi,

I am using Mailto to send an order for a re-ordering system.

I am having trouble creating new lines, I am not sure where I should do this and how. I am using PHP to create the content of the mail, but it looks like this:

<a href=&quot;mailto:<?php echo $row_getlowstock['Supplier_Email']; ?>&subject=Digital Home Stock Re-Order - Model Number - <?php echo $row_getlowstock['Model_Number']; ?>&body=<?php echo $message; ?>

So the body part of the message is:

$message = &quot;Please send us &quot; . $stockneeded . &quot; of the product named: &quot; . $row_getlowstock['Item_Name'];

How do I create a new line in an email? <BR> is HTML and doens't work within the email, is there a special character set I should be using?

Thanks

sipps
 
\ n should work.... no space and put it within the text:

$message = &quot;Please send us &quot; . $stockneeded . &quot; of the product named: \ n&quot; . $row_getlowstock
 
\n doesn't seem to work, when I click on the link and the mail comes up, it all appears on one line, but the \n doesn't actually appear in the mail, so it must be doign something.

Thanks
 
hmmm maybe it is a php thing... is there a php forum?? I would check there...
 
Ok, forget the PHP thing for the moment, how would I write the mailto: statement and insert blank lines?

<a href=&quot;mailto:someone@home.net&subject=This is a test&body = Hello, (linebreak) This is a test (linebreak) this is a new line&quot;>mail me</a>

Thanks

sipps
 
sipps,

Maybe this will help:
faq215-3358

Cheers,
[monkey] Edward [monkey]

&quot;Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!&quot; -- inventor of the cat door
 
<a href=&quot;mailto:someone@home.net?subject=This is a test&body = Hello, \n This is a test \n this is a new line&quot;>mail me</a>
 
The /n didn't work for me either, but this did:

<a href=&quot;mailto:someone@home.net?subject=This is a test&body=Hello, %0DThis is a test%0Dthis is a new line&quot;>mail me</a>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top