ChompGator Posted June 15, 2008 Share Posted June 15, 2008 I have a script, that sends an email to a user after submitting their form. Im only getting one error after coding my script and that is this (Again its after the form is submitted) Warning: mail() [function.mail]: SMTP server response: 503 5.5.2 Need Rcpt command. in d:\register.php on line 91 Line 91 of register.php reads this: "X-Mailer: PHP/".phpversion()); Does anyone know why this is? Ill post my entire script if you guys feel its necessary, its just a big script - so I didnt post it, but let me know if its required. Thanks, Link to comment https://forums.phpfreaks.com/topic/110341-php-smtp/ Share on other sites More sharing options...
yzerman Posted June 15, 2008 Share Posted June 15, 2008 make sure that the $to variable is defined and being sent to the mail() function. Link to comment https://forums.phpfreaks.com/topic/110341-php-smtp/#findComment-566131 Share on other sites More sharing options...
ChompGator Posted June 15, 2008 Author Share Posted June 15, 2008 Hmm, well - it looks as if it is, check this out, here is a bit more of the script: $uid = mysql_insert_id(); mail($email, "Account Activation", "Thank you for registering with Western Canada.\n\n". "After you activate your account, you can login in with the following...\n". " User Id: $uid\n". " Password: $pass1\n". "To activate your account please visit the following URL...\n". " http://www.myurl.org/join/activate.php?uid=$uid&key=".urlencode($key)." \n\n", "From: [email protected]\r\n". "Reply-To: [email protected]\r\n". "X-Mailer: PHP/".phpversion()); print "Thank you for registering! Please check your email for activation instructions."; Link to comment https://forums.phpfreaks.com/topic/110341-php-smtp/#findComment-566135 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.