net.sourceforge.cruisecontrol
Class Mailer
java.lang.Object
|
+--net.sourceforge.cruisecontrol.Mailer
- public class Mailer
- extends java.lang.Object
The Mailer can handle sending simple character based mail messages.
- Since:
- November 28, 2000
- Author:
- Alden Almagro, Jack Bolles, Paul Julius, ThoughtWorks, Inc., neillr
Constructor Summary |
Mailer(java.lang.String mailhost,
java.util.Collection to,
java.lang.String from)
Creates a Mailer for a Collection of "to" addresses. |
Mailer(java.lang.String mailhost,
java.lang.String[] to,
java.lang.String from)
Creates a Mailer for an array of "to" addresses. |
Mailer(java.lang.String mailhost,
java.lang.String to,
java.lang.String from)
Construct a mailer for the given recipient(s) and
sender. |
Method Summary |
void |
sendMessage(java.lang.String subject,
java.lang.String message)
Sends a message to the recipient(s) managed by this
Mailer instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Mailer
public Mailer(java.lang.String mailhost,
java.lang.String to,
java.lang.String from)
- Construct a mailer for the given recipient(s) and
sender.
- Parameters:
to
- Either a single address, or a comma delimited list
of addresses, to which mail should be sent.from
- The sender's address.
Mailer
public Mailer(java.lang.String mailhost,
java.util.Collection to,
java.lang.String from)
- Creates a Mailer for a Collection of "to" addresses.
- Parameters:
to
- Collection of email address to which mail should be sent.from
- Address from which the mail should be sent.
Mailer
public Mailer(java.lang.String mailhost,
java.lang.String[] to,
java.lang.String from)
- Creates a Mailer for an array of "to" addresses.
- Parameters:
to
- Array of email addresses to which mail should be sent.from
- Address from which the mail is sent.
sendMessage
public void sendMessage(java.lang.String subject,
java.lang.String message)
throws java.io.IOException
- Sends a message to the recipient(s) managed by this
Mailer instance.
- Parameters:
subject
- Subject of the mail message.message
- Message body.- Throws:
java.io.IOException
-