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
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.
Joined: Apr 12, 2007
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.