ahhiamdying4u
07-02-2006, 03:59 PM
Hi everybody. This is my first post & I am a PHP newbie. :p
Please someone help me here ...
It is from a form in my site where a user is recommending his friends about my site.
I want to save the emailIDs in mySql db & then send all of them a html message. Sequentially.
DB input is okay ... but no email is going.:(
What I did:
//The first part is all about inserting in sql db.
//Total php written in one big <? ... ?>
$to = $eml1 . ", " ; //note the comma
$to .= $eml2 . ", " ;
$to .= $eml3 . ", " ;
$to .= $eml4;
$subject = $usrnm . "has recommended SMILE to you";
$message = ’<html>
<head><title>smile-india.org.in</title></head>
<body>
...
...
</body>
</html>’;
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* additional headers */
$headers .= "From: <" . $usreml . ">\n";
/* and then mailed it */
mail($to, $subject, $message, $headers);
NO EMAIL IS GOING ... WHAT IS WRONG ??? :confused:
Should I use 'imap_mail' :eek:
Plz Help
Please someone help me here ...
It is from a form in my site where a user is recommending his friends about my site.
I want to save the emailIDs in mySql db & then send all of them a html message. Sequentially.
DB input is okay ... but no email is going.:(
What I did:
//The first part is all about inserting in sql db.
//Total php written in one big <? ... ?>
$to = $eml1 . ", " ; //note the comma
$to .= $eml2 . ", " ;
$to .= $eml3 . ", " ;
$to .= $eml4;
$subject = $usrnm . "has recommended SMILE to you";
$message = ’<html>
<head><title>smile-india.org.in</title></head>
<body>
...
...
</body>
</html>’;
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* additional headers */
$headers .= "From: <" . $usreml . ">\n";
/* and then mailed it */
mail($to, $subject, $message, $headers);
NO EMAIL IS GOING ... WHAT IS WRONG ??? :confused:
Should I use 'imap_mail' :eek:
Plz Help