org.springframework.mail.javamail
Class SmartMimeMessage
java.lang.Object
MimeMessage
org.springframework.mail.javamail.SmartMimeMessage
class SmartMimeMessage
- extends MimeMessage
Special subclass of the standard JavaMail MimeMessage
, carrying a
default encoding to be used when populating the message and a default Java
Activation FileTypeMap
to be used for resolving attachment types.
Created by JavaMailSenderImpl
in case of a specified default encoding
and/or default FileTypeMap. Autodetected by MimeMessageHelper
, which
will use the carried encoding and FileTypeMap unless explicitly overridden.
- Since:
- 1.2
- Author:
- Juergen Hoeller
- See Also:
JavaMailSenderImpl.createMimeMessage()
,
MimeMessageHelper#getDefaultEncoding(javax.mail.internet.MimeMessage)
,
MimeMessageHelper#getDefaultFileTypeMap(javax.mail.internet.MimeMessage)
Constructor Summary |
SmartMimeMessage(Session session,
java.lang.String defaultEncoding,
javax.activation.FileTypeMap defaultFileTypeMap)
Create a new SmartMimeMessage. |
Method Summary |
java.lang.String |
getDefaultEncoding()
Return the default encoding of this message, or null if none. |
javax.activation.FileTypeMap |
getDefaultFileTypeMap()
Return the default FileTypeMap of this message, or null if none. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
defaultEncoding
private final java.lang.String defaultEncoding
defaultFileTypeMap
private final javax.activation.FileTypeMap defaultFileTypeMap
SmartMimeMessage
public SmartMimeMessage(Session session,
java.lang.String defaultEncoding,
javax.activation.FileTypeMap defaultFileTypeMap)
- Create a new SmartMimeMessage.
- Parameters:
session
- the JavaMail Session to create the message fordefaultEncoding
- the default encoding, or null
if nonedefaultFileTypeMap
- the default FileTypeMap, or null
if none
getDefaultEncoding
public final java.lang.String getDefaultEncoding()
- Return the default encoding of this message, or
null
if none.
getDefaultFileTypeMap
public final javax.activation.FileTypeMap getDefaultFileTypeMap()
- Return the default FileTypeMap of this message, or
null
if none.