Hi All, Im using mail($to,$subject,$message,$headers); function to send mail. its already uploaded to server. if i execute this file im getting following error: Warning: mail() [function.mail]: SMTP server response: 503 Bad sequence of commands. You must specify the recipients of a message before you can send it in C:\Inetpub\vhosts\XXX.in\httpdocs\YYY\signup_success.php on line 159 what is this error? Whether i i want to includu any file? (like ini file) Help!!!
Well... you haven't included the code for the signup_success.php, so it's hard to say, but my guess would be that you assign the $to-variable somewhere near line 159 in that file (or use it) - and that it is empty - the error sounds to me like you're trying to send the email to no receipients - ie, the $to-variable is empty. Try echoing out the different variables before using the mail()-function, to see what they contain.
ya got it.. thank you.. But there is another probem... in my inbox , instead of msg im getting some other that is , Message-ID: <FC023E80C237463FBEA43F436CC8EBA9.MAI@home> but i have declared some other in body... suggest!!!
Are you sure you are sending correct headers and the message body? Headers should look somewhat like this MIME-Version: 1.0 Date: Wed, 30 Sep 2009 01:17:05 -0400 Return-Path: webmaster@domain.com X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: PHP Mailer From: "webmaster" <webmaster@domain.com> Content-type: text/plain; charset="utf-8" Code (markup):