I have tried for 2 days to get the script below to work. I have SMTP(SMTP Virtual Server) installed and the service is started(btw, I use win2000 pro).
This is my settings for the mail-function in PHP.ini:
SMTP = localhost; for Win32 onlysendmail_from = myMail@myHost.se ; for Win32 only
Im not sure if I should use "localhost" or "caffeine"(my webroot alias) but I have tried both whith no result. I even tried with the IP adress to the SMTP-server which is the same as my IP.
here is the NON-working script:
<?php
if (isset($submit)) {$recipient="shamloo@spray.se";$subject = "mail subject";$mail_headers ="From:you@your.com<>\n";$mail_headers .="Reply to: you at your.com\n";mail($recipient,$subject,$msg,$mail_headers);}else {print("<FORM METHOD=\"post\" ACTION=\"PHP-sendMail.php\">");print("<INPUT TYPE=\"text\" NAME=\"msg\"><BR>");print("<INPUT TYPE=\"submit\" NAME=\"submit\"><BR>");print("</FORM>");}
?>
Does someone see anything wrong here !?
thanks,
David