/** * <p>Return the size of the message including its headers. * MimeMessage.getSize() method only returns the size of the * message body.</p> * * <p>Note: this size is not guaranteed to be accurate - see Sun's * documentation of MimeMessage.getSize().</p> * * @return approximate size of full message including headers. * * @throws MessagingException if a problem occurs while computing the message size */ public long getMessageSize() throws MessagingException { return MimeMessageUtil.getMessageSize(message); }
/** * @return the message size * @throws MessagingException */ public long getMessageSize() throws MessagingException { return MimeMessageUtil.getMessageSize(getWrappedMessage()); }