-1

For a school project I need to send e-mails from localhost to gmail. I have downloaded and copied all of the files from http://glob.com.au/sendmail/ and pasted them into my xampp/sendmail folder.

Here are my settings which should technically work.

sendmail.ini:

smtp_server=smtp.gmail.com
smtp_port=587
smtp_ssl=auto
auth_username=myemail@gmail.com
auth_password=mypassword

php.ini:

sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
;sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe"
; SMTP = localhost
; smtp_port = 25
Bijan
  • 7,737
  • 18
  • 89
  • 149
user24028
  • 39
  • 1
  • 7
  • possible duplicate of [How to configure XAMPP to send mail from localhost?](http://stackoverflow.com/questions/15965376/how-to-configure-xampp-to-send-mail-from-localhost) – Marcin Orlowski May 19 '15 at 18:46

2 Answers2

2
  1. Make sure you run sendmail.exe as an Administrator and in Compatibility Mode 'Windows XP (Service Pack 3)'. Right-click -> Properties -> Compatibility.
  2. Then visit the following link https://www.google.com/settings/security/lesssecureapps and Accept. Otherwise Gmail will block incoming requests.
Michael Irigoyen
  • 22,513
  • 17
  • 89
  • 131
Joram
  • 36
  • 3
1

If you are using xampp you can check this answer: [How to configure XAMPP to send mail from localhost?

Or you can use phpmailler instead of this method.

Community
  • 1
  • 1