Skip to content

Send Emails from XAMPP lite on Windows

November 13, 2011

This information, like anything else, exists in little random pieces on Google, sometimes outdated. So here is how I was able to get Drupal to send emails from my localhost server using XAMPP lite.

Step 1: update php.ini, located at C:/xampplite/php/php.ini

[mail function]
; For Win32 only.
;SMTP = localhost
;smtp_port = 25

; For Win32 only.
;sendmail_from = postmaster@localhost

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path = "\"C:\xampplite\sendmail\sendmail.exe\" -t"
sendmail_path = "C:\xampplite\sendmail\sendmail.exe -t -i"

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = Off

; Log all mail() calls including the full path of the script, line #, to address and headers
;mail.log = "C:\xampplite\apache\logs\php_mail.log"

Step 2: Update sendmail

  • go to and grab the latest sendmail zip file
  • unzip to desktop and copy the files into your \xampp\sendmail folder replacing everything that was there.
  • edit sendmail.ini (remember to change ‘myemail’ and ‘mypassword’):

One word of caution: if you are using a firewall like me, you’ll need to give access to sendmail.exe.


From → Web Development

  1. Hi

    Thanks for help. I have spent some time looking for this solution.

    Had problem with php mail() function on xampp localhost.
    I have XAMPP for Windows 1.7.7 20.9.2011 on Vista.

    Looks like leates version of xampp 20.09.2011 still use sendmail version 24 (dec 2, 2008).

  2. Anonymous permalink

    it helped me…thanks for the article

  3. glen permalink

    Wow! It Really DID work! thanks a million!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: