Hello,
I'm using the Jmail component to create and send emails. The application is only used for sending emails, receiving is not an issue. What I currently do is using a GUI that enables the user to create and send emails, the underlying component I use is the Jmail component. This all works fine but I've got one problem.
I need to save the outgoing messages. I currently do this by saving the header, body and the 'from address' in a mysql database. This works fine of course but now I also want the users to be able to add attachments. The main problem now is that I want the users to be able to save the outgoing message including the attachments. Of course I can save the attachments in the running directory of the application and create a diffrerent subdir for each message (based on a message id number), then each subdir would contain the attachments for a particular message.
However before I begin programming such a system I want to be sure that this can't be done much easier. Therefore my question is whether there is a build in system (in the jmail component maybe) that allows me to save the whole email (header, body, from address AND ATTACHMENTS) on disk (to a single file ?). I would like to be able to save the email, load it at any time and then be able to substract the different parts of the email (header, body, from address AND ATTACHMENTS) to show them in my GUI again.
Can someone advice me on what the best solution would be?
I'm using the Jmail component to create and send emails. The application is only used for sending emails, receiving is not an issue. What I currently do is using a GUI that enables the user to create and send emails, the underlying component I use is the Jmail component. This all works fine but I've got one problem.
I need to save the outgoing messages. I currently do this by saving the header, body and the 'from address' in a mysql database. This works fine of course but now I also want the users to be able to add attachments. The main problem now is that I want the users to be able to save the outgoing message including the attachments. Of course I can save the attachments in the running directory of the application and create a diffrerent subdir for each message (based on a message id number), then each subdir would contain the attachments for a particular message.
However before I begin programming such a system I want to be sure that this can't be done much easier. Therefore my question is whether there is a build in system (in the jmail component maybe) that allows me to save the whole email (header, body, from address AND ATTACHMENTS) on disk (to a single file ?). I would like to be able to save the email, load it at any time and then be able to substract the different parts of the email (header, body, from address AND ATTACHMENTS) to show them in my GUI again.
Can someone advice me on what the best solution would be?