Google Ads

Proudly Hosted on

About Me

Hi, I 'm Aditya, the guy behind this website and many other. This site acts as my web playground, where I share all about me, my work and my knowledge.

I have over 10.5 yrs hands on experience in PHP, Mysql, JavaScript, open sources CMS like Joomla, Wordpress etc. During these 10.5 years, I have worked on more than 200 projects and/or websites but could not spare time for my blog. But now I am trying to write something whenever I can.

 

 

Sending email from localhost

After struggling for hours, I was able to configure my localhost to send email. This was working untill I upgraded by xampp to 1.8 on win 7 Pro.

So to help someone, I am listing the steps that I followed

Step – 1: Open php.ini and make some changes to [mail function]. The php.ini is under XAMPP\php\php.ini

Step – 2: Make following changes ( assuming xampp is installed on D: drive )

SMTP = localhost 

smtp_port = 25

sendmail_path = "\"D:\xampp\sendmail\sendmail.exe\" -t"

Step – 3: Save php.ini and make sure to restart xampp. 

Step – 4: You can use the existing sendmail or also can download the latest sendmail from http://glob.com.au/sendmail/

Step – 5: Make changes to existing sendmail.ini ( D:\xampp\sendmail\sendmail.ini ) or unzip the contents of above zip to this folder and change in new sendmail.ini

smtp_server=smtp.gmail.com
smtp_port=465
smtp_ssl=auto
error_logfile=error.log
debug_logfile=debug.log
auth_username=YOUR_GMAIL_USERNAME@gmail.com    
auth_password=YOUR_GMAIL_PASSWORD
force_sender=YOUR_GMAIL_USERNAME@gmail.com

Comment the following lines by adding semicolon
;pop3_server=
;pop3_username=
;pop3_password=

;hostname=

You are done, you can now send emails from localhost.

Tags: , ,
Comments are closed.
Home / Sending email from localhost