Send mail on localhost via SMTP

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Send mail on localhost via SMTP

Postby dCart » 08. February 2019 15:17

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 :/
dCart
 
Posts: 8
Joined: 08. February 2019 12:27
Location: Poland
XAMPP version: 3.2.2
Operating System: Windows 10

Re: Send mail on localhost via SMTP

Postby Nobbie » 09. February 2019 20:00

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.
Nobbie
 
Posts: 10712
Joined: 09. March 2008 13:04

Re: Send mail on localhost via SMTP

Postby dCart » 11. February 2019 06:49

I thought that php.ini is used for the whole configuration of XAMPP.
Thanks to Nobbie. E-mails are already being sent correctly! :)
dCart
 
Posts: 8
Joined: 08. February 2019 12:27
Location: Poland
XAMPP version: 3.2.2
Operating System: Windows 10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 57 guests