• Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaMail Size problem  RSS feed

 
Chandu Dharmadhikari
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I've written a command line program to send mail with attachment using SMTP. Program works fine when we send attachment less than 1 MB but throws an exception following when we increase size more than 1 MB.

If anybody can help, Plz tell me how to increase size for attachment.

----------------------------------------------------------------------------
javax.mail.SendFailedException: Sending failed; nested exception is:
javax.mail.MessagingException: 552 4.3.1 Message size exceeds fixed maximum message size

at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at SendMailAttachment.main(SendMailAttachment.java:60)
----------------------------------------------------------------------------
Thanks in Advance :roll:
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like your SMTP server doesn't allow emails over 1MB. Speak to the administrator.
 
Chandu Dharmadhikari
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply

I could solve problem using authentication to SMTP Server

Cheers
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!