API Overview API Index Package Overview Direct link to this page
Apache Ant 1.7.1
  org.apache.tools.mail. MailMessage View Source
Author(s)
Since
Version
1.1, 2000/03/19, added angle brackets to address, helps some servers version 1.0, 1999/12/29
Serial
Hierarchy
 Object
      MailMessage
Implements
Subclasses
Description
public class MailMessage
  A class to help send SMTP email.
See also:   
Constructors
public MailMessage () throws java.io.IOException
  Constructs a new MailMessage to send an email.
public MailMessage (java.lang.String host) throws java.io.IOException
  Constructs a new MailMessage to send an email.
public MailMessage (java.lang.String host, int port) throws java.io.IOException
  Constructs a new MailMessage to send an email.
Methods
Hide/Show inherited methods
public void bcc (java.lang.String bcc) throws java.io.IOException
  Sets the bcc address.
public void cc (java.lang.String cc) throws java.io.IOException
  Sets the cc address.
pack-private void connect () throws java.io.IOException
pack-private void disconnect () throws java.io.IOException
pack-private void flushHeaders () throws java.io.IOException
public void from (java.lang.String from) throws java.io.IOException
  Sets the from address.
public java.io.PrintStream getPrintStream () throws java.io.IOException
  Returns a PrintStream that can be used to write the body of the message.
pack-private void getReady () throws java.io.IOException
pack-private boolean isResponseOK (java.lang.String response, int[] ok)
public void replyto (java.lang.String rto)
  Sets the replyto address This method may be called multiple times.
pack-privatestatic java.lang.String sanitizeAddress (java.lang.String s)
pack-private void send (java.lang.String msg, int[] ok) throws java.io.IOException
public void sendAndClose () throws java.io.IOException
  Sends the message and closes the connection to the server.
pack-private void sendData () throws java.io.IOException
pack-private void sendDot () throws java.io.IOException
pack-private void sendFrom (java.lang.String from) throws java.io.IOException
pack-private void sendHelo () throws java.io.IOException
pack-private void sendQuit () throws java.io.IOException
pack-private void sendRcpt (java.lang.String rcpt) throws java.io.IOException
pack-private void setCcHeader ()
pack-private void setFromHeader ()
public void setHeader (java.lang.String name, java.lang.String value)
  Sets the named header to the given value.
public void setPort (int port)
  Set the port to connect to the SMTP host.
pack-private void setReplyToHeader ()
public void setSubject (java.lang.String subj)
  Sets the subject of the mail message.
pack-private void setToHeader ()
public void to (java.lang.String to) throws java.io.IOException
  Sets the to address.
pack-private java.lang.String vectorToList (java.util.Vector v)
Fields
Hide/Show inherited fields
publicfinalstatic java.lang.String DEFAULT_HOST = "localhost"
default mailhost
publicfinalstatic int DEFAULT_PORT = "25"
default port for SMTP: 25
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar