SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Dec 2000
    Location
    BOSTON MA
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    email formatting help needed.

    i have an online form where a viewer can send someone on a list an email w/out actually revealing their email. and i thought that i had been using the correct code to add line breaks and/or new lines by using /r and /n.

    the problem i just realized was that outlook is displaying it correctly but outlook express isn't even recongnizing the /r and /n.

    the part of the message that is being sent from the user filling out a form is being formatted correctly but the part that i added to the script to be sent along with the submitted text isn't being formatted at all. so all i'm getting is one long string of words with no breaks at all.

    does anyone know how to fix this or can anyone point me to a tutorial or something?

    thank you
    . . . chris

  2. #2
    SitePoint Zealot techie2003's Avatar
    Join Date
    May 2001
    Location
    Boston, Massachusetts
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    uh, what did you write the script yourself?

    it's real simple in PHP using the mail function

    But you have to realize that there's a difference between the escapes you posted and the "<br>" tag. You might what to post an example message and what the output looked like in outlook.
    My computer: Dell Latitude CPx | P3 650/500 w/ 256 MB RAM | 15" 1024x768 | IE 5.5 DSL
    gO rEd SoX! | "The greatest thing you'll ever learn is just to love and be loved in return" - Christian, Moulin Rouge
    l e a r n t o q u e s t i o n | c l i o 3 6 0

  3. #3
    SitePoint Addict
    Join Date
    Dec 2000
    Location
    BOSTON MA
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, this is basically what i have :

    PHP Code:
    // SELECT THE USER

    $emailquery mysql_query("SELECT Email FROM $table WHERE ID='$ID'") or die (mysql_error());

    //only one row should be selected, or else something is wrong. 

        
    $row mysql_fetch_array($emailquery); 

        
    $Email $row["Email"]; 
        
    $headers "From : \"$sender_name\" <$sender_email>\n";
        
    $subject "$subject";
        
    $message "this is where\rpart of the\rmessage is pre-entered\r**************************************************************\r$message";



    //EMAIL THE USER THEIR MESSAGE

    $mailsent mail($Email$subject$message$headers);
     
        
        if (
    $mailsent){
        echo 
    "mail sent";
        }else{
        echo 
    "mail is HAS NOT sent";
        }

    //END OF EMAIL 
    that looks like this in outlook which is fine:

    this is where
    part of the
    message is pre-entered
    **************************************************************
    bla bla bla bla
    but it looks like this in outlook express :
    this is wherepart of themessage is pre-entered**************************************************************bla bla bla bla
    but when i changed the script to this :
    $message = "this is where
    part of the
    message is pre-entered
    **************************************************************
    $message
    it looked fine if both.
    is it possible to omit any \r and \n and still preserve the formatting of the email text across all email application or cross-platform?
    i guess that's the main question.

    thanks.
    Last edited by atomicmunky; Jul 10, 2001 at 14:11.
    . . . chris


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
  •