Setting up Mercury SMTP for XAMPP

20-xampp-logo-trioAlright so after being up late last night until about midnight I finally found out how to get Mercury Server running for SMTP.  This is very helpful when you are testing on your XAMPP server and you are testing your email functionality and want to see the emails that it is sending out.  Below are the steps to get things working.

Setup DNS for your NIC

  • Go to Start->Network Connections
  • Edit the NIC you are using
  • Double Click TCP/IP settings
  • Manually enter in the DNS servers from your ISP

Disable unneeded Protocols

  • Start Mercury from the Control Panel
  • Go to CONFIGURATION->PROTOCOL MODULES
  • Disable everything except the MERCURYC SMTP RELAY CLIENT and MERCURY SMTP
  • Restart Mercury

Make Changes to Core Module

  • Go to CONFIGURATION->MERCURY CORE MODULE then the GENERAL tab
  • Check to make sure “localhost” is the value of “internet name for this system”
  • Disable all but “send copies of all errors to postmaster”
  • check tab “Local Domains” make sure Localhost is there
  • Close and save

Edit MercuryS SMTP Server

  • Open CONFIGURATION -> MERCURY S SMTP SERVER
  • Choose general tab and enter name as SMTP
  • Make sure port 25 is listed
  • Add 127.0.0.1 to “IP interface to use”
  • Go to Connection Control and add 127.0.0.1 to the list
  • Un-check “do not permit SMTP relaying to non-local mail”
  • Close and Save

Edit MercuryC SMTP Client

  • Open CONFIGURATION -> MERCURYC SMTP CLIENT
  • Enter in external SMTP client (smtp.google.com for example) on port 465 with SSL (or whatever ports are supported)
  • Enter your login name and password to that external SMTP server
  • Close and Save

Edit PHP.INI file to include from line

  • Then go edit your PHP.INI file in XAMPP
  • Under [mail function] add the line “sendmail_from = postmaster@localhost
  • Stop and restart Mercury and Apache

Yup 27 steps is why it took me so long to get this thing working!  The key is that last step to the PHP.INI file without that you will get an awesome syntax error on all your emails.

This entry was posted in Software and tagged . Bookmark the permalink.