uk.ac.ebi.mapper.web.struts.business
Class Emailer

java.lang.Object
  extended by uk.ac.ebi.mapper.web.struts.business.Emailer

public abstract class Emailer
extends Object

Class to handle the sending of email (plain text only - to single or multiple recipients.)

Version:
$Id: Emailer.java,v 1.9 2009/09/01 15:50:56 rcote Exp $
Author:
Phil Jones, Richard Cote

Constructor Summary
Emailer()
           
 
Method Summary
static String sendPlainTextMessage(String subject, String message, Collection recipientAddresses, Collection ccAddresses, Collection bccAddresses, boolean copyInPrideSupport)
          Static method that attempts to send a plain text email to a collection of recipients, cc recipients and bcc recipients.
static void sendResultDoneMessage(String filePath, String email)
           
static void sendSupportEmail(Throwable e, javax.servlet.ServletContext svCon)
          Uses javamail to send an error email to the pride support email address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Emailer

public Emailer()
Method Detail

sendPlainTextMessage

public static String sendPlainTextMessage(String subject,
                                          String message,
                                          Collection recipientAddresses,
                                          Collection ccAddresses,
                                          Collection bccAddresses,
                                          boolean copyInPrideSupport)
Static method that attempts to send a plain text email to a collection of recipients, cc recipients and bcc recipients.

Parameters:
subject - being the subject line of the message.
message - being the message being sent.
recipientAddresses - Collection of Strings containing valid email addresses to whome the email will be sent
ccAddresses - (Can be null or empty) Collection of Strings containing valid email addresses to whome the email will be cc'd
bccAddresses - (Can be null or empty) Collection of Strings containing valid email addresses to whome the email will be bcc'd
Returns:
String indicating any errors that occurred during this process.

sendSupportEmail

public static void sendSupportEmail(Throwable e,
                                    javax.servlet.ServletContext svCon)
Uses javamail to send an error email to the pride support email address. The message will include the full stack trace.

Parameters:
e - - the exception to email
svCon - - servletContext object to obtain the email config

sendResultDoneMessage

public static void sendResultDoneMessage(String filePath,
                                         String email)


Copyright © 2011. All Rights Reserved.