0

Yes I know this might be 100th duplicate of this question, but I looked over this thread: How to configure XAMPP to send mail from localhost? and many others and still can't get it to work. My classmate did the same thing earlier today and it all works fine for him. I even asked for his .ini files and code, it still doesn't work. I also reinstalled xampp to see if that would fix it and it doesn't.

php.ini:

[mail function]

SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = maill@gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe" -t"

sendmail.ini

smtp_server=smtp.gmail.com
smtp_port=587
smtp_ssl=ssl
error_logfile=error.log
debug_logfile=debug.log
auth_username=maill@gmail.com
auth_password=magicalpwd
force_sender=galerijospastas@gmail.com

This project will never go live, everything works from my machine with xampp help. Same applies to my classmate, yet for him it works, what am I missing?

Wowy
  • 137
  • 2
  • 11
  • you have port 587 setup, how come you got error on port 25? is there anything else? – Pirate Dec 02 '20 at 19:29
  • may be [this](https://stackoverflow.com/questions/4532486/failed-to-connect-to-mailserver-at-localhost-port-25) or [this](https://stackoverflow.com/questions/2334250/warning-mail-function-mail-failed-to-connect-to-mailserver-at-localhost/2334290) or [this](https://stackoverflow.com/questions/21836282/php-function-mail-isnt-working) can help. – Pirate Dec 02 '20 at 19:31
  • You're missing the backslash between `exe` and `"` – Barmar Dec 02 '20 at 19:31
  • 2
    `sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"` – Barmar Dec 02 '20 at 19:31

1 Answers1

0

Use:

sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
sercan
  • 182
  • 19