[Index]

mail:send


Send a mail message.

Property Summary

debug Turn detailed debug messages on.
files A list of attachment files.
from The from address.
host The host name of the server.
message The message body as text.
name The name of the job.
password The Password for authentication.
port The port of the server.
ssl Use SSL for communication with the mail host.
subject The subject.
to The to addresses.
username The Username for authentication.

Example Summary

Example 1 Send a simple message.
Example 2 Send attachements.

Property Detail

debug

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

Turn detailed debug messages on.

files

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo.

A list of attachment files.

from

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredYes.

The from address.

host

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredYes.

The host name of the server.

message

Configured ByTEXT
AccessREAD_WRITE
RequiredNo.

The message body as text.

name

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

The name of the job. Any text.

password

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

The Password for authentication.

port

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredYes.

The port of the server.

ssl

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

Use SSL for communication with the mail host.

subject

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo. Defaults to (no subject).

The subject.

to

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredYes.

The to addresses. A semicolon delimited list.

username

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

The Username for authentication.


Examples

Example 1

Send a simple message.

<oddjob xmlns:mail="http://rgordon.co.uk/oddjob/mail">
    <job>
        <mail:send name="Send alert mail" from="${my.alert.from}" to="${my.alert.to}" port="${my.mail.port}" host="${my.mail.host}" username="${my.mail.username}" password="${my.mail.password}" subject="Something Important" debug="true" ssl="${my.mail.ssl}">
            Something Important has happened!
        </mail:send>
    </job>
</oddjob>

Example 2

Send attachements. This example rather unimagineatively sends the build file as two seperate attachements.

<oddjob id="oddjob">
    <job>
        <mail:send from="${my.alert.from}" host="${my.mail.host}" name="Send Attachments" password="${my.mail.password}" port="${my.mail.port}" ssl="true" subject="Some Attachements" to="${my.alert.to}" username="${my.mail.username}" xmlns:mail="http://rgordon.co.uk/oddjob/mail">
            <files>
                <list>
                    <values>
                        <file file="${oddjob.dir}/about.txt"/>
                        <file file="${oddjob.dir}/logo.png"/>
                    </values>
                </list>
            </files>
            Check out these attachements!
        </mail:send>
    </job>
</oddjob>


(c) R Gordon Ltd 2005 - Present