I don't understand why my send mail function has stopped working. It used to work ok, but I've just discovered that users who try to sign up to my website no longer receive an email.
I must have changed something by accident.
I've stripped out all of the details to try and get back to basics and work out the problem. But the below code - with correct email addresses replaced - still doesn't work. It always prints that it has succeeded, but emails do not get sent to the address.
Grateful for your help!
$email_address2 = "my@email.com";
$header2 = "From: webmaster@domain.org.uk
";
$subject2 = "Your Membership!";
$message2 = "
The message2
";
$mailsend = mail($email_address2, $subject2, $message2, $header2.">
X-Mailer: PHP/" . phpversion());
if($mailsend) {
echo 'Your membership information has been mailed to your email address!<br/><br/>Please check it and follow the directions!';
} else {
print "There has been an error. Please try again";
}