0

I've been trying to send an email using XAMPP but it doesn't seem to work. I've watched tutorials on how to do it, but in the end it still fails. I'm using Windows 8.

These are the files that I changed.

php.ini

<?php

$send = mail(
    "[email protected]",
    "hello!",
    "hello",
    "From:[email protected]"
);

if ($send) {
    echo "yes";
} else {
    echo "no";
}

?>

sendmail.ini

smtp_server = smtp.gmail.com
smtp_port = 465
smtp_ssl = SSL
error_logfile = error.log
debug_logfile = debug.log
auth_username = [email protected]
auth_password = password(not real password)
force_sender = [email protected]
hostname = smtp.gmail.com

mail.php

[mail function]
; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
SMTP = smtp.gmail.com
smtp_port = 465
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
mail.add_x_header=Off
mail.log = "C:\xampp\php\logs\php_mail.log"
Kenster
  • 23,465
  • 21
  • 80
  • 106

1 Answers1

0

to Windows8

after change file

1-php.ini

2-sendmail.ini

go to C:\xampp\sendmail

1) Right click sendmail.exe and go to properties.

2) click compatibility tab then click change settings for all users.

3) set compatibility mode to Windows XP (Service Pack 3)

4) click the check box for run this progrma as an administrator

Hope that helps someone else.

its working to my