...

View Full Version : Single space text with mail()



Fishhead
01-24-2010, 04:48 AM
I am working on a website that will send an e-mail upon events occuring. I am using the mail() function.

In one location the e-mails look fine, but on a different page the e-mails that are sent are all double spaced. I copied the code from the good location (single spaced) and pasted it in the other and then changed the text. Other than the text they are identical, but the second e-mail is double spaced.

Are there tricks to force single spacing?

abduraooft
01-24-2010, 05:04 PM
Are there tricks to force single spacing? There might be some catch in your code, but I can't say anything without seeing it.

Fishhead
01-24-2010, 07:55 PM
Here's the code. Pretty straight forward.


mail("$email3", "Quota Pounds transfer", "There has been a transfer of $pounds quota pounds of $species from the acount of $ID on $date, to the account of $newownerID.

This transfer came from the account registered to:
$name
F/V $boat
Trawl Permit # $permit
$address
$city, $state $zip

And was transfered to the account registered to:
$name2
F/V $boat2
Trawl Permit # $permit2
$address2
$city2, $state2 $zip2 ", "From: webmaster@trawl.org\n");

Fishhead
01-24-2010, 11:23 PM
I found my problem. There was a space following the last bit of message text and the closing quotation mark. Removing the space fix the double spacing problem. I find that strange, but it now works.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum