One approach could be that you write the mail contents in text file. Add
special tags for the dynamic data.
Then read the file and parse it and replace the tags with the dynamic data.
Now this generated text you can display on web page or use to send the mail.

e.g. your mail in the text file could be following kind and for every user
you will replace the <user> and <password> with the actual user name and
password.

        <Subject> User Information
        Dear Customer,

        Following is the log on information you requested

        User Name: <user>
        Password: <password>

        Thank you,
        ABC India.




-----Original Message-----
From: Raju BSN [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 24, 2003 2:36 PM
To: [EMAIL PROTECTED]
Subject: sending a mail as attachment


Hi,
I'm trying to find a best way to send a mail in java. I'm ready with a class
with will do the job of sending the mail with possible parameters (body
content as string). The application has to send a mail confirmation to the
user once the user action succeeds. We are showing the confirmation to the
user in a jsp. Here is my question we have a preformated jsp to display the
confirmation content..can we make use of this jsp in anyway to generate the
bodycontent for my mail confirmation from a control servlet?

Thanks in advance

Regards
Raju

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to