Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2009
    Location
    McKinleyville, CA
    Posts
    40
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Single space text with mail()

    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?

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,855
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Are there tricks to force single spacing?
    There might be some catch in your code, but I can't say anything without seeing it.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Aug 2009
    Location
    McKinleyville, CA
    Posts
    40
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Here's the code. Pretty straight forward.

    Code:
    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");

  • #4
    New Coder
    Join Date
    Aug 2009
    Location
    McKinleyville, CA
    Posts
    40
    Thanks
    3
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •