File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Having a problem with JavaMail not sending anything when the message is large

 
Rob Tanner
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using SubEtha SMTP in conjunction with JavaMail in order to selectively route mail based on the sender's address (actually I do an LDAP look up and select based on certain criteria in the sender's LDAP entry). The LDAP look-up and the selective routing based on specific criteria within their LDAP entry all works perfectly. I'm seeing a problem occur the message get's too large. I haven't worked it down to the exact number of characters, but I know that a message size of 32217 characters fails. The messages I've tried just picking randomly of my inbox, are a mixture of text, images, and other miscellaneous mime compositions, so I don't think it has to do with specific content, only size. I didn't know there was a size limitation or is it likely something else is the problem but it shows up on the several large files I have?

And one other detail. JavaMail fails quietly. No errors reported and no exceptions thrown.

Any help here would be most appreciated.

Rob Tanner
Linfield College
 
Paul Clapham
Sheriff
Pie
Posts: 20166
24
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It has to be something to do with the server you're connecting to, since clearly JavaMail works fine with large messages in other contexts. Have you tried running JavaMail in debug mode to see what's happening? It's possible that your server stops receiving after a particular threshold is reached and returns an "accept" type code rather than a "fail" type code. You should be able to see that sort of thing from JavaMail debug output.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic