For our project, what we're using is Velocity. I wrote up a simple velocity utility class that would take a velocity template, a hashmap of values, and return the formatted string, and then use that string for the mail body. Then you can keep your velocity files (.vm) in the classpath, and fetch them via the classloader. It works pretty good. I would imagine that you could take it a bit further and store the velocity text in the database instead.
The other option is to use the mailer taglib on a jsp page, but I found that it was distruptive in terms of workflow if you want to do a forward to a page while sending a email, like a password reminder workflow, etc. -tim -----Original Message----- From: Samyukta Akunuru [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 11:05 AM To: Struts Users Mailing List Subject: RE: [OT] Sending email from struts Did you try using JavaMail API -----Original Message----- From: Matt Bathje [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 10:03 AM To: strutslist Subject: [OT] Sending email from struts Hi all. This is kind of off topic as it is not really struts related, but somebody here would probably have the answer. We have our application sending emails to users at some points and it is working fine. The problem is that we have the email message hardcoded into the Java, which we would like to avoid either by storing the message in application.properties or our database. This would be easy, except all of the messages contain user-specific information like their name or phone number or order id or something like that. Anybody have any ideas (or links to programs!) that can read in an email, replace the information it needs to from the db, and send that to the user. I could obviously write something myself to do it, but wouldn't want to reinvent the wheel. Turns out this is hard to search for too - email is not a search term that makes things easy. Thanks, Matt Bathje --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

