ID:               20625
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Feedback
+Status:           Bogus
 Bug Type:         *Mail Related
 Operating System: Free BSD
 PHP Version:      4.2.0
 New Comment:

This is not bug in PHP but in your code..please ask support elsewhere.



Previous Comments:
------------------------------------------------------------------------

[2002-11-25 12:58:31] [EMAIL PROTECTED]

Your code has a slight problem that I see, the 'From:' header contain a
newline between the name & the email, that may cause problems for your
code.

------------------------------------------------------------------------

[2002-11-25 10:59:42] [EMAIL PROTECTED]

* PHP version is actually 4.1.2 but Server is hosted with NTT/Verio so
unable to update PHP version

I am testing my mail function where a user enters their subject and
message on a form and the next page pulls emails from a database and
mails out to everyone. When I put the word From in the message box in
the format From.. or From then on.. or From Sat 16th. it displays a '>'
before the word From like this >From then on.. 
It doesn't do this with lower case from or upper case.  It is ok when
you insert a space before writing From.

I thought it might be getting mixed up with the From tag.  My code is
this:

 <?php
                echo "Emails have been sent to the following people: <br><br>";
                $header = "From: Blair Drummond Safari Park
<[EMAIL PROTECTED]>\n";
                $header .= "Content-Type: text/html\n"; 
                $db = mysql_connect("localhost", "******", "******"); 
                mysql_select_db("******",$db);
                $result = mysql_db_query("******","select * from consumers where
email<>'' and email <> ' ' and mailing<>-1");
                while ($row = mysql_fetch_array($result)) {
                        echo $row["email"]." (".$row["first_name"]." 
".$row["surname"].")
";
                        mail($row["email"],$subject,$message,$header);
                }        
          ?>

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=20625&edit=1

Reply via email to