com.jalios.util
Class MailSender

java.lang.Object
  extended by com.jalios.util.MailSender
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
MailSender

public class MailSender
extends Object
implements Runnable

This class spawns a thread which sends a mail to a set of recipients. Once all the mail has been sent, it can send an acknowledge.

Version:
$Revision: 14756 $
Author:
Jean-Philippe Encausse

Field Summary
protected  boolean ack
           
protected  String ackContent
           
protected  String ackSubject
           
protected static int ASCII_WIDTH
           
protected  Set badEmailSet
           
protected  String bcc
           
protected  String[] content
           
protected  long duration
           
protected  Map files
           
protected  String from
           
protected  Set goodEmailSet
           
protected  String host
           
protected  String login
           
protected  String password
           
protected  int port
           
protected  SortedSet recipientSet
           
static String REVISION
           
protected  boolean sendAll
           
protected  String subject
           
 
Constructor Summary
MailSender(SortedSet recipientSet, String bcc, String from, String subject, String[] content, boolean ack, Map files)
           
MailSender(SortedSet recipientSet, String bcc, String from, String subject, String[] content, boolean ack, Map files, String ackSubject, String ackContent)
           
MailSender(SortedSet recipientSet, String bcc, String from, String subject, String[] content, boolean ack, Map files, String ackSubject, String ackContent, String host, int port, String login, String password)
           
 
Method Summary
protected  String getAckContent()
           
protected  String getAckSubject()
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

ASCII_WIDTH

protected static final int ASCII_WIDTH
See Also:
Constant Field Values

recipientSet

protected SortedSet recipientSet

bcc

protected String bcc

from

protected String from

subject

protected String subject

content

protected String[] content

ack

protected boolean ack

files

protected Map files

host

protected String host

port

protected int port

login

protected String login

password

protected String password

ackSubject

protected String ackSubject

ackContent

protected String ackContent

goodEmailSet

protected Set goodEmailSet

badEmailSet

protected Set badEmailSet

duration

protected long duration

sendAll

protected boolean sendAll
Constructor Detail

MailSender

public MailSender(SortedSet recipientSet,
                  String bcc,
                  String from,
                  String subject,
                  String[] content,
                  boolean ack,
                  Map files)
Parameters:
recipientSet - a Set of String email
bcc - an email list sperated by ','
from - an email
subject - a subject
content - a content
ack - send an acknoledge
files - a Map of attachement File / fileId

MailSender

public MailSender(SortedSet recipientSet,
                  String bcc,
                  String from,
                  String subject,
                  String[] content,
                  boolean ack,
                  Map files,
                  String ackSubject,
                  String ackContent)
Parameters:
recipientSet - a Set of String email
bcc - an email list sperated by ','
from - an email
subject - a subject
content - a content
ack - send an acknoledge
files - a Map of attachement File / fileId
ackSubject - the acknoledge Subject
ackContent - the acknoledge Content

MailSender

public MailSender(SortedSet recipientSet,
                  String bcc,
                  String from,
                  String subject,
                  String[] content,
                  boolean ack,
                  Map files,
                  String ackSubject,
                  String ackContent,
                  String host,
                  int port,
                  String login,
                  String password)
Parameters:
recipientSet - a Set of String email
bcc - an email list sperated by ','
from - an email
subject - a subject
content - a content
ack - send an acknoledge
files - a Map of attachement File / fileId
ackSubject - the acknoledge Subject
ackContent - the acknoledge Content
host - the smtp host
port - the smtp port
login - the smtp login
password - the smtp password
Method Detail

run

public void run()
Specified by:
run in interface Runnable

getAckSubject

protected String getAckSubject()

getAckContent

protected String getAckContent()


Copyright © 2001-2007 Jalios SA. All Rights Reserved.