Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.taskdefs
Class SendEmail

    java.lang.Object
      |
      +--org.apache.tools.ant.Task
            |
            +--org.apache.tools.ant.taskdefs.SendEmail

public class SendEmail
extends Task

A task to send SMTP email.

Attribute | Description | Required
--- | --- | ---
from | Email address of sender. | Yes
mailhost | Host name of the mail server. | No, default to "localhost"
toList | Comma-separated list of recipients. | Yes
subject | Email subject line. | No
files | Filename(s) of text to send in the body of the email. Multiple files are comma-separated. | One of these two attributes
message | Message to send inthe body of the email.

Author:
  glenn_twiggs@bmc.com

Fields inherited from class org.apache.tools.ant.Task
`description, location, project, target, taskName, taskType, wrapper`

Constructor Summary
`SendEmail()` Creates new SendEmail

Method Summary
`void` | `execute()` Executes this build task.
`void` | `setFiles(java.lang.String filenames)` Sets the file parameter of this build task.
`void` | `setFrom(java.lang.String from)` Sets the from parameter of this build task.
`void` | `setMailhost(java.lang.String mailhost)` Sets the mailhost parameter of this build task.
`void` | `setMessage(java.lang.String message)` Sets the message parameter of this build task.
`void` | `setSubject(java.lang.String subject)` Sets the subject parameter of this build task.
`void` | `setToList(java.lang.String toList)` Sets the toList parameter of this build task.

Methods inherited from class org.apache.tools.ant.Task
`getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, init, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SendEmail

    public SendEmail()

  Creates new SendEmail

Method Detail

### setToList

    public void setToList(java.lang.String toList)

  Sets the toList parameter of this build task.
  Parameters:
    `toList` - Comma-separated list of email recipient addreses.

### setFrom

    public void setFrom(java.lang.String from)

  Sets the from parameter of this build task.
  Parameters:
    `from` - Email address of sender.

### setMailhost

    public void setMailhost(java.lang.String mailhost)

  Sets the mailhost parameter of this build task.
  Parameters:
    `mailhost` - Mail host name.

### setMessage

    public void setMessage(java.lang.String message)

  Sets the message parameter of this build task.
  Parameters:
    `message` - Message body of this email.

### setSubject

    public void setSubject(java.lang.String subject)

  Sets the subject parameter of this build task.
  Parameters:
    `subject` - Subject of this email.

### setFiles

    public void setFiles(java.lang.String filenames)

  Sets the file parameter of this build task.
  Parameters:
    `filenames` - Filenames to include as the message body of this email.

### execute

    public void execute()

  Executes this build task. throws org.apache.tools.ant.BuildException if there is an error during task execution.
  Overrides:
    `execute` in class `Task`
  Following copied from class: `org.apache.tools.ant.Task`
  Throws:
    `BuildException` - if someting goes wrong with the build

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Apache Software Foundation. All Rights Reserved.