I think i tried to fix this issue fr 3 days now and cant seem to find the problem.
I use XAMPP and use this code:
<?php
$to = "
carl[email protected]";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "
carl[email protected]";
$headers = "From: $from";
$res= mail($to,$subject,$message,$headers);
echo " $res Mail Sent.";
?>
when i enter that page i get an error that says:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set(
My php.init file in xampp are as follow:
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = smpt.gmail.com
; http://php.net/smtp-port
smtp_port = 25
That is all my codes.