-
-
Notifications
You must be signed in to change notification settings - Fork 275
Closed
Labels
Milestone
Description
When attaching a file, the content-type is inferred by MimeBodyPart
by reading from the input stream. This occurs twice per attachment before the data is written out, resulting in 3 http calls. If the DataSource
implements javax.mail.EncodingAware
then this used if the result is non-null. When the file type is known, such as a pdf, this should avoid the extra hops. Unfortunately the given DataSource
is decorated by NamedDataSource
, so this optimization is not possible.