Project Wonder 2.0

er.corebusinesslogic
Class ERCMailDelivery

java.lang.Object
  extended byer.corebusinesslogic.ERCMailDelivery

public class ERCMailDelivery
extends Object

Utility class used for sending mails via the ERCMailMessage database tables. Actual emails are then sent using the ERMailer application.


Field Summary
protected static ERCMailDelivery _sharedInstance
          holds a reference to the shared instance
static ERXLogger log
          logging supprt
 
Constructor Summary
ERCMailDelivery()
           
 
Method Summary
static String commaSeparatedListFromArray(NSArray a)
          Utilitiy method used to break an array of email addresses down into a comma separated list.
 ERCMailMessage composeComponentEmail(String from, NSArray to, NSArray cc, NSArray bcc, String title, String componentName, NSDictionary bindings, EOEditingContext ec)
          Composes a mail message from a given component.
 ERCMailMessage composeComponentEmail(String from, NSArray to, NSArray cc, NSArray bcc, String title, String componentName, String plainTextComponentName, NSDictionary bindings, EOEditingContext ec)
          Composes a mail message from a given component.
 ERCMailMessage composeComponentEmail(String from, NSArray to, NSArray cc, NSArray bcc, String title, WOComponent component, EOEditingContext ec)
          Composes a mail message from a given component.
 ERCMailMessage composeEmail(String from, NSArray to, NSArray cc, NSArray bcc, String title, String message, EOEditingContext ec)
          Composes a mail message.
 ERCMailMessage composeEmailWithAttachments(String from, NSArray to, NSArray cc, NSArray bcc, String title, String message, NSArray filePaths, EOEditingContext ec)
          Composes a mail message with attachments.
static ERCMailDelivery sharedInstance()
          Gets the shared instance used to create ERCMailMessages.
static boolean usesMail()
          Is Mail turned on
 
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 supprt


_sharedInstance

protected static ERCMailDelivery _sharedInstance
holds a reference to the shared instance

Constructor Detail

ERCMailDelivery

public ERCMailDelivery()
Method Detail

sharedInstance

public static ERCMailDelivery sharedInstance()
Gets the shared instance used to create ERCMailMessages.

Returns:
shared instance used to create mail messages.

commaSeparatedListFromArray

public static String commaSeparatedListFromArray(NSArray a)
Utilitiy method used to break an array of email addresses down into a comma separated list. Performs a bit of search and replace to clean up the email addresses a bit.

Parameters:
a - array of email addresses
Returns:
comma separated and cleaned up list of email addresses

usesMail

public static boolean usesMail()
Is Mail turned on

Returns:
if the Mail is turned on

composeEmail

public ERCMailMessage composeEmail(String from,
                                   NSArray to,
                                   NSArray cc,
                                   NSArray bcc,
                                   String title,
                                   String message,
                                   EOEditingContext ec)
Composes a mail message.

Parameters:
from - email address
to - email addresses
cc - email addresses
bcc - email addresses
title - of the message
message - text of the message
ec - editing context to create the mail message in.
Returns:
created mail message for the given parameters

composeEmailWithAttachments

public ERCMailMessage composeEmailWithAttachments(String from,
                                                  NSArray to,
                                                  NSArray cc,
                                                  NSArray bcc,
                                                  String title,
                                                  String message,
                                                  NSArray filePaths,
                                                  EOEditingContext ec)
Composes a mail message with attachments.

Parameters:
from - email address
to - email addresses
cc - email addresses
bcc - email addresses
title - of the message
message - text of the message
filePaths - array of file paths to attach
ec - editing context to create the mail message in.
Returns:
created mail message for the given parameters

composeComponentEmail

public ERCMailMessage composeComponentEmail(String from,
                                            NSArray to,
                                            NSArray cc,
                                            NSArray bcc,
                                            String title,
                                            WOComponent component,
                                            EOEditingContext ec)
Composes a mail message from a given component.

Parameters:
from - email address
to - email addresses
cc - email addresses
bcc - email addresses
title - of the message
component - to render to get the message
ec - editing context to create the mail message in.
Returns:
created mail message for the given parameters

composeComponentEmail

public ERCMailMessage composeComponentEmail(String from,
                                            NSArray to,
                                            NSArray cc,
                                            NSArray bcc,
                                            String title,
                                            String componentName,
                                            NSDictionary bindings,
                                            EOEditingContext ec)
Composes a mail message from a given component.

Parameters:
from - email address
to - email addresses
cc - email addresses
bcc - email addresses
title - of the message
componentName - name of the component to render
ec - editing context to create the mail message in.
Returns:
created mail message for the given parameters

composeComponentEmail

public ERCMailMessage composeComponentEmail(String from,
                                            NSArray to,
                                            NSArray cc,
                                            NSArray bcc,
                                            String title,
                                            String componentName,
                                            String plainTextComponentName,
                                            NSDictionary bindings,
                                            EOEditingContext ec)
Composes a mail message from a given component.

Parameters:
from - email address
to - email addresses
cc - email addresses
bcc - email addresses
title - of the message
componentName - name of the component to render
plainTextComponentName - name of the component to render
ec - editing context to create the mail message in.
Returns:
created mail message for the given parameters

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

Copyright © 2002 – 2004 Project Wonder.