• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mail with attachment using jsp

 
biny panackal
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • 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
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • 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?
 
Richard Waldicott
Greenhorn
Posts: 9
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic