Connecting Tech Pros Worldwide Help | Site Map

problem with mail function when the time of connection with database in php

Banned
 
Join Date: Mar 2008
Posts: 10
#1: Mar 26 '08
Hi,


I created the registration form .In that form email field also there.when click on submit button this email field will stored on the database.In the mail function to address mentioned as
$to="$_POST[email_addr]". By using like that i got the following error.

Warning: mail() [function.mail]: SMTP server response: 503 5.5.2 Need Rcpt command. in D:\wamp\www\register_initiated.php on line 17..

and by using like that

$to="hhh@gmail.com" not got the error.

plz tell that how to solve my error..
Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,936
#2: Mar 26 '08

re: problem with mail function when the time of connection with database in php


try
[php]
$to = $_POST['field_name'];
[/php]
Reply