Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use JSP to send email

 
Seagle Yang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,all
Can anybody help me?
I want to put a button on the JSP page, when click it, we can open up the default email application (e.g. Outlook) and automatically attach a specific file to it, and then we can manually input the receiver and some content to send the email to somebody.
I don't know it is possible, if can, what should I do? Any response will be much appreciated.
Seagle
 
Riley Brook
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmmm..
If this is an intranet app and you can guarantee all users have Outlook: is there a file extension which is recognized as an Outlook file? Maybe by constructing this file on-the-fly and shooting it to the browser it will launch outlook with the content you prefilled it with. This is an idea. I've never tried this in practice.
Other option would be to do the email construction (and sending) all on the app server. Provide a message box for the user's data entry (reply address, comments, attached files, etc.) and then use JavaMail to send it maybe ccing the originator so it gets back to the client's Outlook.
Please post what you do end up doing. I'll be curious.
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Seagle,
so you want to attach a file on the server side to the email you pop up? OR client side file as an attachment?
thanks!
maulin
 
Geeta Gune
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi yang,
Actually u can open the outlook express and put the subject and sent to address simply by using the mailto tag which u can use in the href tag on a link or a button.

But sending an attachment as well is a little bit difficult though but i would recommend that u check out some javascript forums..
We are not using jsp at all if u want to send mail through outlook express but if u want to use the javamail package then maybe u should check out the sun site for javamail docs and examples.
Hope this helps
Geeta
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic