Project Wonder 2.0

er.javamail.mailer
Class ERMailer

java.lang.Object
  extended byer.javamail.mailer.ERMailer

public class ERMailer
extends Object

Mailer bridge class. Used to pull mail out of the ERMailMessage entity and send it via the ERJavaMail framework for sending mail.


Field Summary
protected static ERMailer instance
          holds a reference to the shared instance
static ERXLogger log
          logging support
protected  String messageTitlePrefix
          Caches the message title prefix
 
Constructor Summary
ERMailer()
           
 
Method Summary
 ERMailDelivery createMailDeliveryForMailMessage(ERCMailMessage message)
          Creates a ERMailDelivery for a given MailMessage.
static ERMailer instance()
          Gets the shared mailer instance.
 String messageTitlePrefix()
          The message title prefix is used to distiguish emails generated in different environments.
 void processOutgoingMail()
          Fetches all mail that is ready to be sent from the ERMailMessage table and sends the message using the ERJavaMail framework for sending messages.
 void sendMailMessages(NSArray mailMessages)
          Sends an array of ERCMailMessage objects.
protected static boolean shouldDeleteSentMail()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final ERXLogger log
logging support


instance

protected static ERMailer instance
holds a reference to the shared instance


messageTitlePrefix

protected String messageTitlePrefix
Caches the message title prefix

Constructor Detail

ERMailer

public ERMailer()
Method Detail

shouldDeleteSentMail

protected static boolean shouldDeleteSentMail()

instance

public static ERMailer instance()
Gets the shared mailer instance.

Returns:
mailer singleton

processOutgoingMail

public void processOutgoingMail()
Fetches all mail that is ready to be sent from the ERMailMessage table and sends the message using the ERJavaMail framework for sending messages.


sendMailMessages

public void sendMailMessages(NSArray mailMessages)
Sends an array of ERCMailMessage objects.

Parameters:
mailMessages - array of messages to send

createMailDeliveryForMailMessage

public ERMailDelivery createMailDeliveryForMailMessage(ERCMailMessage message)
                                                throws javax.mail.MessagingException
Creates a ERMailDelivery for a given MailMessage.

Parameters:
message - mail message
Returns:
a mail delevery object
Throws:
javax.mail.MessagingException

messageTitlePrefix

public String messageTitlePrefix()
The message title prefix is used to distiguish emails generated in different environments.

Returns:
message title prefix

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.