ak47_kalani
ak47_kalani

Reputation: 15

how to modify xampp to send mails using php?

this is my code for sending mail through xampp i have modified the php.ini and sendmail.ini from the xampp . Upon running the php i'm not getting email. Please help me .

php.ini

[mail function]

 SMTP =smtp.gmail.com <br>
 smtp_port =587

; For Win32 only.

 ;sendmail_from [email protected]

sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

sendmail.ini

smtp_server=smtp.gmail.com

; smtp port (normally 25)

smtp_port=587

[email protected] <br>
auth_password=password <br>
[email protected]

The php code used for sending email is this

mail("[email protected]","subject","this is the mail","From:     [email protected]");


this is my code for php. Tell me the errors ??

Upvotes: 0

Views: 4262

Answers (1)

Malinda
Malinda

Reputation: 408

I got this error today too. I found this working solution in SO. Just change sendmail.exe file's compatibility mode to Windows XP SP 3.

  1. Right click sendmail.exe and goto properties
  2. change compatibility mode to Windows XP SP 3

You can find Original post here

Upvotes: 0

Related Questions