Hi,
Have a look at Velocity (Jakarta), templating engine. You can use that
to substitute the user details and form the mail message. The template could
just be a resourse file with velocity tags.
Cheers
Sachin
----- Original Message -----
From: "Matt Bathje" <[EMAIL PROTECTED]>
To: "strutslist" <[EMAIL PROTECTED]>
Sent: Thursday, February 12, 2004 3:02 AM
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]