SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict delpino's Avatar
    Join Date
    Nov 2001
    Location
    London
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    problem with email

    I have an account with Ventures (which hosts sitepoint too) Since a week or two I have problem with the mail function with php.

    If I send something like this:

    $msg="this is line one
    this is line two
    this is line three";

    mail($email, $mailsubject, $msg, $mailheaders);

    this will send the message with returns:

    this is line one

    this is line two

    this is line three

    before it wasn't like this, anybody has a clue why this happens?
    http://www.antosch-and-lin.com - Language Learning

  2. #2
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you FTP a new version of the script to the server before this problem arose? If you have FTPed a new version of the script in question to the server, I am more inclined to think this is where things have gone wrong. Perhaps you uploaded in binary instead of ASCII? I would try FTPing the script again. But then, I could be completely on the wrong track here

  3. #3
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    are you using windows newlines? or unix newlines? or mac?
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  4. #4
    SitePoint Addict delpino's Avatar
    Join Date
    Nov 2001
    Location
    London
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I didn't change anything... so I think my host must have changed something.. Besides I use secure copy (PenguiNet) to upload scripts.. there is no binary or ascii mode.

    right now I have to do the following:

    $msg="this is line one\nthis is line two\nthis is line three";

    this will solve the problem, but it doesn't look very good, and its hard to handle this way.

    I use Windows XP (Homesite) to edit the scripts.
    http://www.antosch-and-lin.com - Language Learning

  5. #5
    SitePoint Addict delpino's Avatar
    Join Date
    Nov 2001
    Location
    London
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anybody?

    I noticed that the notifications from Sitepointforums have the same problems with too many blank lines.
    http://www.antosch-and-lin.com - Language Learning

  6. #6
    SitePoint Addict delpino's Avatar
    Join Date
    Nov 2001
    Location
    London
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I solved this with this:

    $msg=str_replace("\n", "", $msg);
    http://www.antosch-and-lin.com - Language Learning


Bookmarks

Posting Permissions

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