Project Wonder 5.0

er.javamail
Class ERMailDeliveryHTML

java.lang.Object
  extended by er.javamail.ERMailDelivery
      extended by er.javamail.ERMailDeliveryComponentBased
          extended by er.javamail.ERMailDeliveryHTML

public class ERMailDeliveryHTML
extends ERMailDeliveryComponentBased

This ERMailDelivery subclass is specifically crafted for HTML messages using a WOComponent as rendering device.

Author:
Camille Troillard

Nested Class Summary
static class ERMailDeliveryHTML.DefaultFactory
          The default factory.
static interface ERMailDeliveryHTML.Factory
           
 
Field Summary
protected  java.lang.String _htmlContent
          Holds the HTML content
protected static ERMailDeliveryHTML.Factory factory
           
 
Fields inherited from class er.javamail.ERMailDeliveryComponentBased
_alternativeComponent, _component, _sessionDictionary
 
Fields inherited from class er.javamail.ERMailDelivery
_attachments, _charset, _inlineAttachments, _mimeMessage, DefaultCharset
 
Constructor Summary
ERMailDeliveryHTML()
           
 
Method Summary
static ERMailDeliveryHTML.Factory factory()
          Gets the current factory.
protected  java.lang.String htmlContent()
           
 void newMail()
          Creates a new mail instance within ERMailDelivery.
static ERMailDeliveryHTML newMailDelivery()
           
protected  javax.activation.DataHandler prepareMail()
          Pre-processes the mail before it gets sent.
static void setFactory(ERMailDeliveryHTML.Factory value)
          Sets the factory.
 void setHiddenPlainTextContent(java.lang.String content)
          Sets the Plain text preamble that will be displayed set in top of HTML source.
 void setHTMLContent(java.lang.String content)
          Sets the HTML content.
 
Methods inherited from class er.javamail.ERMailDeliveryComponentBased
_componentContentString, alternativeComponent, alternativeComponentContentString, component, componentContentString, sessionDictionary, setAlternativeComponent, setComponent, setSessionDictionary, setWOComponentContent
 
Methods inherited from class er.javamail.ERMailDelivery
_attachments, _inlineAttachments, addAttachment, addInlineAttachment, attachments, buildMessage, charset, contextString, finishMessagePreparation, inlineAttachments, internetAddressWithEmailAndPersonal, mimeMessage, removeAttachment, sendMail, sendMail, session, setAdditionalHeader, setBCCAddresses, setBCCAddresses, setCCAddresses, setCCAddresses, setCharset, setContextString, setDelegate, setFromAddress, setFromAddress, setInternetAddresses, setMimeMessage, setReplyToAddress, setReplyToAddress, setSession, setSubject, setToAddress, setToAddress, setToAddresses, setToAddresses, setUserInfo, setXMailerHeader, userInfo, xMailerHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected static ERMailDeliveryHTML.Factory factory

_htmlContent

protected java.lang.String _htmlContent
Holds the HTML content

Constructor Detail

ERMailDeliveryHTML

public ERMailDeliveryHTML()
Method Detail

factory

public static ERMailDeliveryHTML.Factory factory()
Gets the current factory. If the factory is unset, sets it to the default factory.

Returns:
the current factory

setFactory

public static void setFactory(ERMailDeliveryHTML.Factory value)
Sets the factory.

Parameters:
value - the factory to use

newMailDelivery

public static ERMailDeliveryHTML newMailDelivery()

setHiddenPlainTextContent

public void setHiddenPlainTextContent(java.lang.String content)
Sets the Plain text preamble that will be displayed set in top of HTML source. Non-HTML compliant mail readers can at least display this message.


setHTMLContent

public void setHTMLContent(java.lang.String content)
Sets the HTML content. Note that if you set the WOComponent to be used when rendering the message this content will be ignored.

Parameters:
content - HTML content to be used

newMail

public void newMail()
Creates a new mail instance within ERMailDelivery. Sets hasHiddenPlainTextContent to false.

Overrides:
newMail in class ERMailDelivery

htmlContent

protected java.lang.String htmlContent()

prepareMail

protected javax.activation.DataHandler prepareMail()
                                            throws javax.mail.MessagingException
Pre-processes the mail before it gets sent.

Specified by:
prepareMail in class ERMailDelivery
Returns:
the multipart used to put in the mail.
Throws:
javax.mail.MessagingException
See Also:
ERMailDelivery#prepareMail

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.