Reputation: 3185
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.
Upvotes: 1
Views: 691
Reputation: 18863
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:
SMTP = smtp.gmail.com
smtp_port = 465
sendmail_from = [email protected]
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
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.ini
add the following, (note you may have to comment out the mercury section):
account GmailTest
tls on
tls_certcheck off
host smtp.gmail.com
from [email protected]
auth on
user [email protected]
password gmailpassword
port 465
And finally modify the account default and set it to GmailTest
and 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/
Upvotes: 1
Reputation: 8508
Is it connected to the internet? If you have access to other mail servers (Gmail, Host Provider Email) you can reroute your email using their settings.
Upvotes: 0