Page 1 of 1

Send mail on localhost via SMTP

PostPosted: 08. February 2019 15:17
by dCart
Hi

How I can send mails on localhost via smtp?
I edited php.ini change code on

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


But it doesn't work :/

Re: Send mail on localhost via SMTP

PostPosted: 09. February 2019 20:00
by Nobbie
dCart wrote:But it doesn't work :/


Of course not. That is weird and plain nonsense.

1) Neither use SMTP=.... nor smtp_port= in php.ini, remove these lines (or comment them out via adding a "#" in the first column).
2) At next proceed to c:/xampp/sendmail and edit sendmail.ini

In sendmail.ini you have to apply valid credentials for an SMTP server, which you got from your email provider. After you put all your valid data into sendmail.ini, save that file and finally restart Apache.
Setting up emails correctly is not for beginners. you have to have some knowledge how to set up SMTP correctly. Xampp can't do that for you, you need to know exactly what to do.

Re: Send mail on localhost via SMTP

PostPosted: 11. February 2019 06:49
by dCart
I thought that php.ini is used for the whole configuration of XAMPP.
Thanks to Nobbie. E-mails are already being sent correctly! :)