[Index]

mail:send


Send a mail message.

Property Summary

files An 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.
subject The subject.
to The to addresses.

Example Summary

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

Property Detail

files

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo.

An 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.

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.


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}" host="${my.mailhost}" subject="FTP download failed">
            Important jobs Failed!
        </mail:send>
    </job>
</oddjob>

Example 2

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

<oddjob xmlns:mail="http://rgordon.co.uk/oddjob/mail">
    <job>
        <mail:send name="Send Attachments" from="${my.alert.from}" to="${my.alert.to}" host="${my.mailhost}" subject="Some Attachements">
            <files>
                <list>
                    <values>
                        <file file="build.xml"/>
                        <file file="build.xml"/>
                    </values>
                </list>
            </files>
        </mail:send>
    </job>
</oddjob>


(c) Rob Gordon 2005 - 2017