Package org.apache.camel.component.mail
Interface ContentTypeResolver
-
public interface ContentTypeResolver
Resolver to determine Content-Type for file attachments. Strategy introduced to work around mail providers having problems with this such as geronimo mail jars. Note using SUN mail jar have no problem with resolving Content-Type based on file attachments. This resolver is thus only needed to work around mail providers having bugs or when you a new mime type is unknown by the mail provider allowing you to determine it.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
resolveContentType(String fileName)
Resolves the mime content-type based on the attachment file name.
-
-
-
Method Detail
-
resolveContentType
String resolveContentType(String fileName)
Resolves the mime content-type based on the attachment file name. Return null if you cannot resolve a content type or want to rely on the mail provider to resolve it for you. The returned value should only be the mime part of the ContentType header, for example: image/jpeg should be returned. Camel will add the remaining ; name=FILENAME.- Parameters:
fileName
- the attachment file name- Returns:
- the Content-Type or null to rely on the mail provider
-
-