org.springframework.mail.javamail
Class SmartMimeMessage
java.lang.Object
javax.mail.Message
javax.mail.internet.MimeMessage
org.springframework.mail.javamail.SmartMimeMessage
- All Implemented Interfaces:
- MimePart, Part
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)
Methods inherited from class javax.mail.internet.MimeMessage |
addFrom, addHeader, addHeaderLine, addRecipients, addRecipients, createInternetHeaders, getAllHeaderLines, getAllHeaders, getAllRecipients, getContent, getContentID, getContentLanguage, getContentMD5, getContentStream, getContentType, getDataHandler, getDescription, getDisposition, getEncoding, getFileName, getFlags, getFrom, getHeader, getHeader, getInputStream, getLineCount, getMatchingHeaderLines, getMatchingHeaders, getMessageID, getNonMatchingHeaderLines, getNonMatchingHeaders, getRawInputStream, getReceivedDate, getRecipients, getReplyTo, getSender, getSentDate, getSize, getSubject, isMimeType, isSet, parse, removeHeader, reply, saveChanges, setContent, setContent, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setFlags, setFrom, setFrom, setHeader, setRecipients, setRecipients, setReplyTo, setSender, setSentDate, setSubject, setSubject, setText, setText, updateHeaders, writeTo, writeTo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SmartMimeMessage
public SmartMimeMessage(Session session,
String defaultEncoding,
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 String getDefaultEncoding()
- Return the default encoding of this message, or
null
if none.
getDefaultFileTypeMap
public FileTypeMap getDefaultFileTypeMap()
- Return the default FileTypeMap of this message, or
null
if none.
Copyright (c) 2002-2006 The Spring Framework Project.