Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 85594

Re: Form/php not returning certain data

$
0
0

According to the official specification for plain text email messages (http://tools.ietf.org/html/rfc2822#section-2.3), a newline character must not appear independently in the body. It should always be preceded by a carriage return.

 

Your code looks like this:

 

$totalmessage = "

        Name:        $name  \n

        Email:        $email  \n

        Subject:    $subject  \n

        Comment:    $comment  \n ";

 

Change it to this:

 

$totalmessage = "

        Name:        $name  \r\n

        Email:        $email  \r\n

        Subject:    $subject  \r\n

        Comment:    $comment";

 

The specification also says that lines in the body must be no longer than 998 characters. Because you have no idea how long the content in the text area will be, it's a good idea to pass the body of the email to the wordwrap function like this before sending the mail:

 

$totalmessage = wordwrap($totalmessage, "\r\n");

 

I also agree with bregent that you should be using $_POST instead of $_REQUEST.


Viewing all articles
Browse latest Browse all 85594

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>