This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Sending attachments with emails  RSS feed

 
Ravi Singh
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anyone tell me/show me how to send an attachment that is uploaded from the client?

Thank you.
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ravi,

Try this JavaMail tutorial from jGuru. Its pretty simple to follow & should serve your basic needs. There's an FAQ on JavaMail at jGuru too.

HTH.
 
ravinderSingh singh
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are there any examples of how to send an attachment that has been sent from the user's machine via HTTP instead?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not really an EJB question. Have a search through the Servlets forum for "uploading files". That should get you started.
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ravinder,

Are there any examples of how to send an attachment that has been sent from the user's machine via HTTP instead?


I'm not exactly sure what you're asking. But as far as I know, it doesn't really matters where the attachment that you wish to send via email comes from. It could be uploaded or received via HTTP. So long as you are able to get it, you could then send it out as an email using JavaMail.

The jGuru tutorial does shows you step by step on how to send an email with attachment.

HTH.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!