I have a scenario wherein When there is any match(can be considered to a trigger), an email notification has to be sent from the application to the customer. Basically 'from' id would be the same and 'to' changes.
What are the various email sending options available? I'm working in Java/JBOSS server. Should I host an SMTP server? Or a cron job which runs and in turn sends emails... either way I need to find out a method to send email. I'm new to this tech. Any inputs appreciated. Thanks.
1.) As already stated, the Javamail API is the way to go: http://www.oracle.com/technetwork/java/javamail/index.html
2.) I further would recommend a wrapper around the Java Mail API that really simplifies constructing your emails (The Mail API is very hard to work with constructing HTML/Text Emails). I would highly recommend this: http://commons.apache.org/email/
3.) As Mail Transfer Agent I would not recommend a Java one but rather use a dedicated SMTP Server, like the mentioned postfix. With Javamail the SMTP Server can be any arbitrary server, hosted on your own.
Or use services like google mail and you simply connect to them via the java mail API. There are no good Java SMTP Servers available and postifx has plenty of options (also in regard to security) but in my opinion, it is best to use existing infrastructure.
With Java Mail you can use your current email provider (or the company email server you might most likely have already). Your admins only have to create a new email address and account and then you can send mails over this account with java mail api.