• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Mail with attachment using jsp

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,
Can i send a mail with attachment using JSP. I tryd some code but finally it came to a stage that i have to upload the file to server befor attaching. I dont want to upload the file to server. Expecting some good comment for this problem

email: binypanackal@gmail.com
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Certainly you can send e-mail with attachments using JSP. (It would be much better to do that in a servlet or a bean rather than a JSP, but if you really must, you can put scriptlets in your JSP.)

But naturally you can only attach data that is on the server where the JSP is running. So if there's a file on the client's machine that needs to be attached to an e-mail that you want to send from the JSP, that file has to be uploaded from the client to the server. No way around that.
 
biny panackal
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
dear sir,
Thank you for your replay.If i am using servlet insted of jsp.Can i upload a file in client machine..? Do you have any code to do this. IF so could you send it to me.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Can i upload a file in client machine..?



Various ways are discussed in: FileUpload. Would you want to upload manually or programmatically? Do you have an FTP server running on the web server machine?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic