Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Friday, 12 August 2011

SubEthaSMTP: Store email as files before sending out

I have written a simple handler for SubEthaSMTP that will save emails to specific folders before sending them out. First the main function to setup stuff (SMTPServer.java)

You can download it from here. (Note: There are three source class in there, with their Class Name properly highlighted).

What it does is to start an SMTP server (standard SMTP Port) in the workstation/server you are running it on.

You will need to configure SMTPMessageHandlerFactory to set the appropriate smtp host, smtp port, smtp user and smtp password to send the email to.

Whenever a mail is received, it will write the contents of the mail in folder: outbox/{fromemailaddr}/{date}/{time}

It will work for normal mail (HTML/plain) and mail with attachments, but not message/rfc822 type.

Also, because I am not able to read BCC headers from the mail received via SMTP, instead of processing the TO, CC, and BCC in the mail content, I will send out the mail to everyone separately, putting them in the TO field for each email sent.

Please help to test out and comment accordingly. Thanks.

Friday, 24 June 2011

Welcome to Coders Unite!

Hi there, welcome to Coders Unite blog. I hope this can be a place in the Internet for Intellectual Discussion among coders to improve software development quality.

Over the years, Internet and Open-Source movement has caused a very huge impact on coders' life. Nowadays, there is no need to re-invent the wheel as many open-source projects exists where we can just adapt them to our requirements. As such, sharing knowledge ought to be a more important agenda as it will benefit not just us but the industry in general, as this will increase our awareness of available open-source projects. When usage of these projects increases, it will help to motivate the project owners to further improve upon their projects as well as hopefully introduce more contributors to the projects.