Forum Moderators: coopster
Newbie here. I set up a login verification program. New users get sent an activation code via the mail() function. Problem is that it doesn't send to hotmail or gmail addresses (I assume others like Yahoo won't work either).
I have tried all the other quick fixes revolving around headers, but am still truly lost and have been for a couple of weeks.
Do I need to change anything in the php.ini file or such like? (I don't have root access, so don't know how it is set).
If I can't get it to work... what are my alternatives? (apart from banning Hotmail, gmail and the like from becoming users).
Will I have to use a different language or mail function? If so a link to any resources would be helpful
(Also Horde doesn't send mails to Hotmail or Gmail but can receive them.)
Here's the code, although it is not a problem anymore, it would be good to know why it started working all of a sudden.
$email = "newuser@hotmail.com":
$subject = "welcome";
$message = "welcome message";
$headers = 'From: me@mysite.net' . "\n" .
'Reply-To: me@mysite.net' . "\n" .
'X-Mailer: PHP/' . phpversion();
mail($email, $subject, $message, $headers);
Maybe it had to wait for my DNS to be recognised or something? I don't know.