Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2007
    Posts
    91
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Mail sending error! Please help.

    Hi,

    I'm getting the below error while sending mail.

    Error:
    Code:
    Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for zyz@slkkd.com in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mail.php on line 39
    Code:
    Code:
      if (isset($_POST["submit"])) {
    
        $to = strip_tags($_POST["to"]);
        $sub = strip_tags($_POST["sub"]);
        $feedback = strip_tags($_POST["feedback"]);
        $from = strip_tags($_POST["from"]);	
        $to= "xyz@gmail.com";	
        $sendto = $to;
        $subject = $sub;
        $message = $feedback;
        $headers ="MIME-Version:1.0\r\n";
        $headers .="content-type:text/html; Charset=iso-8859-1\r\n";
        $headers .="From:     <" . "$from" . ">\r\n";
        $headers .="X-Sender: <" . "$sendto" . ">\r\n";
        $headers .="Return-Path: <" . "$sendto" . ">\r\n";
        $headers .="Error-To: <" . "$sendto" . ">\r\n";
        $sendto = trim($sendto);
         $themail= mail($sendto, $subject, $message, $headers) ;
         
        
      }
    Kindly help.
    Thanks,
    Ramki

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    http://email.about.com/cs/standards/...ror_code_2.htm says
    550 - The requested command failed because the user's mailbox was unavailable (for example because it was not found, or because the command was rejected for policy reasons).
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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