info.magnolia.module.mail.templates
Class MgnlEmail

java.lang.Object
  extended by javax.mail.Message
      extended by javax.mail.internet.MimeMessage
          extended by info.magnolia.module.mail.templates.MgnlEmail
All Implemented Interfaces:
javax.mail.internet.MimePart, javax.mail.Part
Direct Known Subclasses:
MgnlMultipartEmail

public abstract class MgnlEmail
extends javax.mail.internet.MimeMessage

Base class to send emails using Magnolia. Date: Mar 30, 2006 Time: 1:01:37 PM

Author:
Nicolas Modrzyk

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.mail.internet.MimeMessage
javax.mail.internet.MimeMessage.RecipientType
 
Field Summary
protected static String CHARSET_HEADER_STRING
           
protected static String CONTENT_TYPE
           
protected static Pattern EMAIL_WITH_PERSONAL_PATTERN
           
static org.slf4j.Logger log
           
protected static String TEXT_HTML_UTF
           
protected static String TEXT_PLAIN_UTF
           
 
Fields inherited from class javax.mail.internet.MimeMessage
content, contentStream, dh, flags, headers, modified, saved
 
Fields inherited from class javax.mail.Message
expunged, folder, msgnum, session
 
Fields inherited from interface javax.mail.Part
ATTACHMENT, INLINE
 
Constructor Summary
MgnlEmail(MailTemplate template)
           
 
Method Summary
 javax.mail.internet.MimeBodyPart addAttachment(MailAttachment attachment)
           
 String getContentType()
           
 MailTemplate getTemplate()
           
 boolean isBodyNotSetFlag()
           
 void setAttachments(List<MailAttachment> list)
           
 void setBccList(String list)
           
 void setBody()
           
abstract  void setBody(String text)
           
 void setBodyFromResourceFile()
           
 void setBodyNotSetFlag(boolean _bodyNotSetFlag)
           
 void setCcList(String list)
           
 void setCharsetHeader(String charset)
           
 void setFrom(String _from)
           
 void setReplyToList(String list)
           
 void setSubject(String arg0)
           
 void setTemplate(MailTemplate template)
           
 void setToList(String list)
           
 
Methods inherited from class javax.mail.internet.MimeMessage
addFrom, addHeader, addHeaderLine, addRecipients, addRecipients, createInternetHeaders, createMimeMessage, getAllHeaderLines, getAllHeaders, getAllRecipients, getContent, getContentID, getContentLanguage, getContentMD5, getContentStream, 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, setText, setText, setText, updateHeaders, updateMessageID, writeTo, writeTo
 
Methods inherited from class javax.mail.Message
addRecipient, getFolder, getMessageNumber, isExpunged, match, setExpunged, setFlag, setMessageNumber, setRecipient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_TYPE

protected static final String CONTENT_TYPE
See Also:
Constant Field Values

TEXT_PLAIN_UTF

protected static final String TEXT_PLAIN_UTF
See Also:
Constant Field Values

TEXT_HTML_UTF

protected static final String TEXT_HTML_UTF
See Also:
Constant Field Values

CHARSET_HEADER_STRING

protected static final String CHARSET_HEADER_STRING
See Also:
Constant Field Values

EMAIL_WITH_PERSONAL_PATTERN

protected static final Pattern EMAIL_WITH_PERSONAL_PATTERN

log

public static org.slf4j.Logger log
Constructor Detail

MgnlEmail

public MgnlEmail(MailTemplate template)
Method Detail

setBody

public abstract void setBody(String text)
                      throws Exception
Throws:
Exception

setSubject

public void setSubject(String arg0)
                throws javax.mail.MessagingException
Overrides:
setSubject in class javax.mail.internet.MimeMessage
Throws:
javax.mail.MessagingException

isBodyNotSetFlag

public boolean isBodyNotSetFlag()

setBodyNotSetFlag

public void setBodyNotSetFlag(boolean _bodyNotSetFlag)

setTemplate

public void setTemplate(MailTemplate template)

getTemplate

public MailTemplate getTemplate()

setFrom

public void setFrom(String _from)

setCharsetHeader

public void setCharsetHeader(String charset)
                      throws MailException
Throws:
MailException

setToList

public void setToList(String list)
               throws Exception
Throws:
Exception

setCcList

public void setCcList(String list)
               throws Exception
Throws:
Exception

setBccList

public void setBccList(String list)
                throws Exception
Throws:
Exception

setReplyToList

public void setReplyToList(String list)
                    throws Exception
Throws:
Exception

setAttachments

public void setAttachments(List<MailAttachment> list)
                    throws MailException
Throws:
MailException

addAttachment

public javax.mail.internet.MimeBodyPart addAttachment(MailAttachment attachment)
                                               throws MailException
Throws:
MailException

setBodyFromResourceFile

public void setBodyFromResourceFile()
                             throws Exception
Throws:
Exception

getContentType

public String getContentType()
Specified by:
getContentType in interface javax.mail.Part
Overrides:
getContentType in class javax.mail.internet.MimeMessage

setBody

public void setBody()
             throws Exception
Throws:
Exception


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.