I have a local development box that I code on before I transfer my programs to a test server. It’s a basic xampp set up. However, this limits my ability to test on the local box when I have to send mail in my program. Is there a way to mock this? I don’t have any desire to set up a mail server on my local machine. Most questions on this subject on stack deal with setting up a mail server. That’s why I’m asking this particular question.
As always, Thank you for your help and advice.
I tend to just use GMAIL via SMTP (easy enough to setup a free test GMAIL account). ProjectPier has a tutorial on it, just read between the lines and set it up for your needs: http://www.projectpier.org/node/817
There is also a generic tutorial, which I would prefer to use, here: http://expertester.wordpress.com/2010/07/07/how-to-send-email-from-xampp-php/
EDIT
The gist, just because you cannot trust external sources to stay alive here is re-write of what they talk about:
First up you will need to edit the php.ini (c:\xampp\php\php.ini). locate the [mail function] and change the following settings:
Make sure that you put in your proper xampp install path and drive letter. Next we need to edit the sendmail.ini,
c:\xampp\sendmail\sendmail.iniadd the following, (note you may have to comment out the mercury section):And finally modify the account default and set it to
GmailTestand you should be good to go. Credits for the above goto http://expertester.wordpress.com/2010/07/07/how-to-send-email-from-xampp-php/