I have an app that has some interesting "incoming" email features, namely that it has a hyrbid mailing list/web-based forum ala houseoffusion. Ideally, I would write/use an SMTP service that interacts directly with the application's API, but the shortcut was to leverage existing email infrastructure already setup for the project - by polling the mail server every few minutes using CFPOP. Everything went well, the app went into production, and now we realized that we want to handle incoming attachments (which then have their content stripped using java and are indexed for the forum's search - another topic :).
The problem was that with the app in production I couldn't really use the mail servers to test the new attachment-handling features. Rather than duplicate our complicated mail server setup - I needed to setup something locally to test with. Now, I'm sure there are a billion ways to go about this, from postfix & sendmail, IIS, who knows what else - but I'm going to document the route I took because it took me about 10 mintues to have my little mail dev server up and running:
Not many people know about JAMES. It stands for Java Apache Mail Enterprise Server: http://james.apache.org/
I have some familiarity with it because Sakai (another topic) uses a JAMES "mailet" to process incoming email. As I mentioned above, maybe in the future I'll run JAMES in production and write a piece of code (called a "mailet") that talks directly to my app when JAMES recieves mail.
In this case, I just want a simple SMTP/POP3 server, and JAMES can do that well.
That's it - from there JAMES should just *work* (until you close the command prompt). I was able to quickly mimic incoming mail by simply sending mail to account-name@localhost and then fetch it using CFPOP.
| ||