Hello,
I'm currently trying to get the following scenario working:
I have a HTML form fields for text input and a file upload field. On submit the content of the fields should be e-mailed to a certain address with the uploaded file as attachment. I realize this with a Java Servlet and Java class using JavaMail API.
When I'm sending the mail without attachments it works fine.
When I'm using only the class (without the HTML and servlet who is calling it) the mail gets properly send with the attachment.
However, if I'm using the HTML/servlet constellation I don't receive a proper e-mail, only the following in the mail message:
[MIME content for this item is stored in attachment $RFC822.eml. Parsing MIME content failed: Incorrect format in MIME data..]
I assume that it might be something with my Tomcat configuration, because I eliminated with my tests all other possibilities. I'm using Tomcat 5.5.9 on Windows XP (for testing). One other thing also made me think that it might be related to Tomcat: I didn't get the mail/Session on Tomcat running. I followed the instructions on to set up the environment for the mail/Session, but it didn't work, I couldn't send e-mails at all. Unfortunately I also have no error messages in the Tomcat log files. Because of time pressure I worked around this problem, however I think that the two problems might relate.
Has anyone experienced similar problems? Are there any configurations I can set so that the mail content-type is set? Any ideas to the problem with the mail/Session?
Any ideas/suggestions/hints are really appreciated.
Regards, Karin
I'm currently trying to get the following scenario working:
I have a HTML form fields for text input and a file upload field. On submit the content of the fields should be e-mailed to a certain address with the uploaded file as attachment. I realize this with a Java Servlet and Java class using JavaMail API.
When I'm sending the mail without attachments it works fine.
When I'm using only the class (without the HTML and servlet who is calling it) the mail gets properly send with the attachment.
However, if I'm using the HTML/servlet constellation I don't receive a proper e-mail, only the following in the mail message:
[MIME content for this item is stored in attachment $RFC822.eml. Parsing MIME content failed: Incorrect format in MIME data..]
I assume that it might be something with my Tomcat configuration, because I eliminated with my tests all other possibilities. I'm using Tomcat 5.5.9 on Windows XP (for testing). One other thing also made me think that it might be related to Tomcat: I didn't get the mail/Session on Tomcat running. I followed the instructions on to set up the environment for the mail/Session, but it didn't work, I couldn't send e-mails at all. Unfortunately I also have no error messages in the Tomcat log files. Because of time pressure I worked around this problem, however I think that the two problems might relate.
Has anyone experienced similar problems? Are there any configurations I can set so that the mail content-type is set? Any ideas to the problem with the mail/Session?
Any ideas/suggestions/hints are really appreciated.
Regards, Karin