com.partnersoft.io.net
Class MailMessageBuilder

java.lang.Object
  extended by com.partnersoft.io.net.MailMessageBuilder

Deprecated.

public class MailMessageBuilder
extends java.lang.Object

A construction class for MIME email messages. Provides convenience routines to hide the drudgery of building an actual javax.mail.Message object. This is an old class, and should be abandoned at some point.

New code should defer to the com.partnersoft.net package.

Author:
Paul Reavis Copyright 2005 Partner Software, Inc.

Constructor Summary
MailMessageBuilder()
          Deprecated. Creates a new MailMessageBuilder with a default SMTP server derived from URLLib.resolveHostName("SMTPServer").
MailMessageBuilder(java.lang.String smtpHost)
          Deprecated.  
 
Method Summary
 void addBCCRecipient(java.lang.String toAddress)
          Deprecated. Adds a BCC recipient.
 void addCCRecipient(java.lang.String toAddress)
          Deprecated. Adds a CC recipient.
 void addRecipient(java.lang.String toAddress)
          Deprecated. Same as addTORecipient.
 void addTORecipient(java.lang.String toAddress)
          Deprecated. Adds a TO recipient.
 void attachFile(java.io.File newFile)
          Deprecated. Adds a file part.
 void attachHTML(java.lang.String fileName, java.lang.String newHTML)
          Deprecated. Adds an html part.
 void attachText(java.lang.String newText)
          Deprecated. Adds a text part.
 void sendMessage()
          Deprecated. Sends the current message.
 void setFrom(java.lang.String fromAddress)
          Deprecated. Sets the from address.
 void setSubject(java.lang.String newSubject)
          Deprecated. Sets the message subject.
 void startMessage()
          Deprecated. Starts a new message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailMessageBuilder

public MailMessageBuilder()
Deprecated. 
Creates a new MailMessageBuilder with a default SMTP server derived from URLLib.resolveHostName("SMTPServer").


MailMessageBuilder

public MailMessageBuilder(java.lang.String smtpHost)
Deprecated. 
Method Detail

startMessage

public void startMessage()
                  throws javax.mail.MessagingException
Deprecated. 
Starts a new message.

Throws:
javax.mail.MessagingException

sendMessage

public void sendMessage()
                 throws javax.mail.MessagingException
Deprecated. 
Sends the current message.

Throws:
javax.mail.MessagingException

setFrom

public void setFrom(java.lang.String fromAddress)
             throws javax.mail.MessagingException
Deprecated. 
Sets the from address.

Throws:
javax.mail.MessagingException

addRecipient

public void addRecipient(java.lang.String toAddress)
                  throws javax.mail.MessagingException
Deprecated. 
Same as addTORecipient.

Throws:
javax.mail.MessagingException

addTORecipient

public void addTORecipient(java.lang.String toAddress)
                    throws javax.mail.MessagingException
Deprecated. 
Adds a TO recipient.

Throws:
javax.mail.MessagingException

addCCRecipient

public void addCCRecipient(java.lang.String toAddress)
                    throws javax.mail.MessagingException
Deprecated. 
Adds a CC recipient.

Throws:
javax.mail.MessagingException

addBCCRecipient

public void addBCCRecipient(java.lang.String toAddress)
                     throws javax.mail.MessagingException
Deprecated. 
Adds a BCC recipient.

Throws:
javax.mail.MessagingException

setSubject

public void setSubject(java.lang.String newSubject)
                throws javax.mail.MessagingException
Deprecated. 
Sets the message subject.

Throws:
javax.mail.MessagingException

attachText

public void attachText(java.lang.String newText)
                throws javax.mail.MessagingException
Deprecated. 
Adds a text part. Do this at least once to set the body of the message. Doing it more times adds additional MIME text attachments.

Throws:
javax.mail.MessagingException

attachHTML

public void attachHTML(java.lang.String fileName,
                       java.lang.String newHTML)
                throws javax.mail.MessagingException
Deprecated. 
Adds an html part.

Throws:
javax.mail.MessagingException

attachFile

public void attachFile(java.io.File newFile)
                throws javax.mail.MessagingException
Deprecated. 
Adds a file part.

Throws:
javax.mail.MessagingException