Yes you can. Check you're getting a valid email address in the variable $retrieveuseremail, try echoing it before the mail() function:
echo $retrieveuseremail; mail($retrieveuseremail, "Subject", "Body of email"); Ross > -----Original Message----- > From: Marlene Burckhalter [mailto:[EMAIL PROTECTED]] > Sent: 13 August 2002 21:27 > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] mail() function > > > I am very new at this... > > I want to use the mail funtion, but instead of using an actual > e-mail address for the first argument, I want to pass it a > variable that I have assigned to the resulting return of a > function. The fuction ends like this : > > function get_useremail {... > > $query_data = mysql_fetch_row($result); > return $query_data[0]; > } > > I then assigned the function to a variable: > > $retrieveuseremail = get_useremail ($username, $userid); > > WHEN I TRY TO USE $retrieveuseremail AS THE FIRST ARGUMENT IN THE > MAIL FUNCTION, I GET AN ERROR MESSAGE : > Failed to receive in 'C:ThePathToTheDocument' > > CAN I PASS A VARIABLE HERE? > > Marlene > > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php