Print Friendly, PDF & Email

Enabling Mail on Windows

To enable mail services on Windows requires a few (but not obvious) extra steps. Since Windows isn’t Linux or a *nix based operating system, these settings are only needed for Windows users to mirror similar functionality like a typical hosting provider’s LAMP (Linux Apache MySQL PHP) setup.  Enabling mail services will allow you to test WordPress notifications and features like the ‘lost password’ request link.

You will need to simply provide credentials to an email server in the sendmail.ini file. In my example below, I will use a typical gmail account:

  1. Open the sendmail.ini file in notepad by locating it in Windows Explorer and double clicking the file at c:\xampplite\sendmail\sendmail.ini
  2. You can comment out the current mail definitions and append your own but be sure to define the account default. The entire contents of my sendmail.ini file looks like this (sans the PasswordGoesHere):

# Example for a user configuration file
# Set default values for all following accounts.
logfile “\xampplite\sendmail\sendmail.log”# A freemail service example account
account Gmail
tls on
tls_certcheck off
tls_starttls off
auth on
password PasswordGoesHere

# Set a default account
account default : Gmail

Last, you will need to stop and restart the web and database services. You should now be able to use the ‘Lost Password?’ recovery link in WordPress as well as send outgoing WordPress notifications from your development server.

Last updated on November 10, 2016