Hi,
I don't know why Php does not send e-mail from my test environment with the following code. Please help.
environment:
Win XP SP2, Apache 2.0.54, Php 5.0.4
php.ini:
[mail function]
;this is my actual remote smtp server and port
SMTP = mail.axelero.hu
smtp_port = 25
;sendmail_from = me@example.com
;sendmail_path =
;mail.force_extra_parameters =
code:
$email=isset($REQUEST['email'])?$REQUEST['email']:'';
$subject = 'Registration';
$text='bla bla bla activate:'."\r\n\r\n".
'http://myserver.hu/activation.php?user='.$user.'&pin='.$pin."\r\n";
$header='From: myvalidaddress@freemail.hu'."\r\n";
// everything seems correct
print $email.'<br>'.$subject.'<br><pre>'.$text.'</pre><br>'.$header.'<br>';
print mail($email,$subject,$text,$header)?"success":"error";