How to send email from xampp to gmail

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
sudhir.gadiraju
Forum Newbie
Posts: 2
Joined: Mon Sep 16, 2013 7:45 am

How to send email from xampp to gmail

Post by sudhir.gadiraju »

Hi guys. I just want to know how to send email from my php mail() function in my index.php. I made all the modifications in the php.ini file and sendmail.in. But all in vain.

My sendmail.in file contains:
------------------------------------
smtp_server=smtp.gmail.com
smtp_port=465 (tried 587 and 25)
smtp_ssl=ssl (tried auto also)
error_logfile=error.log
auth_username=sudhir.gadiraju@gmail.com
auth_password=my gmail account password
force_sender=sudhir.gadiraju@gmail.com

My php.in [mail function] contains
-------------------------------------
SMTP = smtp.gmail.com
smtp_port = 465 (tried 587 and 25)
sendmail_from = sudhir.gadiraju@gmail.com
sendmail_path = "\"\xampp\sendmail\sendmail.exe\" -t"

My php index.php conatins the following code:

<?php
mail('sudhir.gadiraju@gmail.com', 'Hello', 'This is a test email', 'From:noreply@gmail.com');
?>

Any ideas please help. Thanks in advance.
Post Reply