xampp mercury mail localhost solution

When we doing php and wanted to use php mail or do some test, the default settings is not allowed us to do what we want, normally we get this error:

Warning: mail() [function.mail]: Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set() in C:\xampp\htdocs\filename blahblahblah
Failure

First of all, you need to download Thunderbird, mail client,

then enable Mercury services, the same as the picture shown below

Image

Click Admin and then go to manager local users

Image

Add a new user, name and password can be anything.

Image

Make sure, you uncheck  “Do not Permit SMTP relaying to non-local mail”

Image

ALMOST done, then open thunderbird

and add an account as the picture shown below

Image

NOW you can get the php mail locally, and do test

Image