I am breaking my head with this mail() function.
I have a config.inc.php file and in there I have a global variable with i set as:
In another php page, I am sending a form using the mail() function.
Here is the example:
// Target email address.
$to = $email;
// Your subject.
$subject = “Registration Confirmation”;
// Set this email to HTML email format.
$mail_from .=“Content-Type: text/html; charset=utf-8 n”;
// Your message.
$message = “Thank you for registering at the User Registration site.
$message .= “To activate your account, please click on this link.”;
$message .= “
It seems that the “$to” which retrieves the global variable $email doesn’t work.
If i do “echo $email;”, i do see the proper variable, but for some reason, passing it onto to the mail() function gives me the error…
"mail() [function.mail]: SMTP server response: 551 User not local. We don’t relay "
Can anyone help?