While searching the net I found a rather simple lines of code for sending email.
I know, this is not ALL, there has to be more to it. I have not specified mail server and stuff like that. How can I set it up on my site?PHP Code:$to = "[email protected]";
$subject = "site feedback";
$message = stripslashes(trim($_POST['mssg']));
$from = "[email protected]";
$headers = "From: ".$_POST['user'];
mail($to,$subject,$message,$headers);
I am running wampserver and email page is in localhost. Can I send email from my desktop? I found 2 more lines of code to be appended before mail(), these are:
It refuses to work. here is the error message:ini_set("SMTP","smtp.example.com" );
ini_set('sendmail_from', '[email protected]');
Warning: mail() [function.mail]: SMTP server response: 501 5.7.1 <[email protected]>... Sender refused by the DNSBL xbl.spamhaus.org




Reply With Quote