Results 1 to 11 of 11

Thread: php mail

Threaded View

  1. #1

    Thread Starter
    Lively Member sridharao's Avatar
    Join Date
    Feb 2007
    Posts
    106

    php mail

    While searching the net I found a rather simple lines of code for sending email.
    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 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?

    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:
    ini_set("SMTP","smtp.example.com" );
    ini_set('sendmail_from', '[email protected]');
    It refuses to work. here is the error message:
    Warning: mail() [function.mail]: SMTP server response: 501 5.7.1 <[email protected]>... Sender refused by the DNSBL xbl.spamhaus.org
    Last edited by sridharao; Jul 15th, 2009 at 11:01 AM.
    Save trees, avoid plastics, say no to zoo, go veg, recycle as much, live holistic

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width