Keel 2.1RC2

org.keel.services.mail
Interface Mailer

All Known Implementing Classes:
DefaultMailer

public interface Mailer

This interface defines a Mailer service for sending email through a mail- server. The message is auumed to be in multi-part MIME format, based on the number of attachments provided before sending the email.

Version:
$Revision: 1.3 $ $Date: 2003/10/10 23:12:03 $
Author:
Shash Chatterjee Created on Jan 1, 2003

Field Summary
static java.lang.String ROLE
          The ROLE name used to acquire services that implement this service
 
Method Summary
 void addMIMEAttachment(java.lang.String fileName)
          Add a MIME attachment, MIME-type will be determined automatically by the system
 void addMIMEAttachment(java.lang.String[] fileNames)
          Add multiple MIME attachments
 void send()
          Send the email to the mail-server
 void send(java.lang.String host, java.lang.String user, java.lang.String password)
          Send mail to a different host with a different user and password
 void setBccAddress(java.lang.String address)
          Set the blind-carbon-copy addresses for this email
 void setBccAddress(java.lang.String[] addresses)
          Set multiple blibd-carbon-copy addresses
 void setCcAddress(java.lang.String address)
          Set the carbon-copy address for this email
 void setCcAddress(java.lang.String[] addresses)
          Set multiple carbon-copy addresses
 void setFromAddress(java.lang.String address)
          Set the address of the sender of the email
 void setHeader(java.lang.String name, java.lang.String value)
          Set an arbitrary header
 void setMessage(java.lang.String message)
          Set the text content of the email, weill be sent as first attachment
 void setReplyToAddress(java.lang.String address)
          Set the reply-to header in the email, usually if different from the sender's email.
 void setReplyToAddress(java.lang.String[] addresses)
          Set multiple reply-to addresses
 void setSubject(java.lang.String subject)
          Set the subject of the email
 void setToAddress(java.lang.String address)
          The address to send email
 void setToAddress(java.lang.String[] addresses)
          Set the addresses to send email to
 

Field Detail

ROLE

public static final java.lang.String ROLE
The ROLE name used to acquire services that implement this service

See Also:
Constant Field Values
Method Detail

setToAddress

public void setToAddress(java.lang.String address)
                  throws NestedException
The address to send email

Parameters:
address - A standard address, or a comma-separated list of addresses
Throws:
NestedException

setToAddress

public void setToAddress(java.lang.String[] addresses)
                  throws NestedException
Set the addresses to send email to

Parameters:
addresses - An array of String addresses
Throws:
NestedException

setFromAddress

public void setFromAddress(java.lang.String address)
                    throws NestedException
Set the address of the sender of the email

Parameters:
address -
Throws:
NestedException

setReplyToAddress

public void setReplyToAddress(java.lang.String address)
                       throws NestedException
Set the reply-to header in the email, usually if different from the sender's email.

Parameters:
address -
Throws:
NestedException

setReplyToAddress

public void setReplyToAddress(java.lang.String[] addresses)
                       throws NestedException
Set multiple reply-to addresses

Parameters:
addresses -
Throws:
NestedException

setCcAddress

public void setCcAddress(java.lang.String address)
                  throws NestedException
Set the carbon-copy address for this email

Parameters:
address -
Throws:
NestedException

setCcAddress

public void setCcAddress(java.lang.String[] addresses)
                  throws NestedException
Set multiple carbon-copy addresses

Parameters:
addresses -
Throws:
NestedException

setBccAddress

public void setBccAddress(java.lang.String address)
                   throws NestedException
Set the blind-carbon-copy addresses for this email

Parameters:
address -
Throws:
NestedException

setBccAddress

public void setBccAddress(java.lang.String[] addresses)
                   throws NestedException
Set multiple blibd-carbon-copy addresses

Parameters:
addresses -
Throws:
NestedException

setSubject

public void setSubject(java.lang.String subject)
                throws NestedException
Set the subject of the email

Parameters:
subject -
Throws:
NestedException

setHeader

public void setHeader(java.lang.String name,
                      java.lang.String value)
               throws NestedException
Set an arbitrary header

Parameters:
name -
value -
Throws:
NestedException

setMessage

public void setMessage(java.lang.String message)
                throws NestedException
Set the text content of the email, weill be sent as first attachment

Parameters:
message -
Throws:
NestedException

addMIMEAttachment

public void addMIMEAttachment(java.lang.String fileName)
                       throws NestedException
Add a MIME attachment, MIME-type will be determined automatically by the system

Parameters:
fileName -
Throws:
NestedException

addMIMEAttachment

public void addMIMEAttachment(java.lang.String[] fileNames)
                       throws NestedException
Add multiple MIME attachments

Parameters:
fileNames -
Throws:
NestedException

send

public void send()
          throws NestedException
Send the email to the mail-server

Throws:
NestedException

send

public void send(java.lang.String host,
                 java.lang.String user,
                 java.lang.String password)
          throws NestedException
Send mail to a different host with a different user and password

Parameters:
host -
user -
password -
Throws:
NestedException

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.