|
|
|
|
smtp.send
|
| |
|
description
Send a mail using by default the SMTP and the charset specified in the configuration file.
privilege-required
anyone
tx-support
false
|
| |
|
INSTRUCTION
|
|
name
|
type
|
default-value
|
required
|
description
|
| charset |
string |
none |
false |
Charset to use for the current mail. Common charset are: ASCII, Cp1252, ISO8859_1, UnicodeBig, UnicodeBigUnmarked
UnicodeLittle, UnicodeLittleUnmarked, UTF8, UTF-16.
US-ASCII maps to ASCII, ISO-8859-1 to ISO8859_1, UTF-8 to UTF8, UTF-16BE to UnicodeBigUnmarked, and UTF-16LE to UnicodeLittleUnmarked.
(see http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html). |
| smtp-server |
string |
none |
false |
SMTP server address. |
|
| |
|
PARAMETER
|
|
name
|
type
|
default-value
|
required
|
description
|
| content-type |
string |
none |
false |
Type of the content (default is text/plain but it can also be text/html for HTML rendering).
Warning when setting content type 'text/plain', don't forget to append charset (if you need one)
otherwise there wont be any charset for the message.
For exemple, with UTF8 charset you have to write 'text/plain; charset=UTF8'. |
| to |
string |
none |
false |
To: destination of the mail. |
| from |
string |
none |
false |
From: source of the mail. |
| priority |
integer |
none |
false |
X-priority mail header.
Values: 1 (Highest), 2 (High), 3 (Normal), 4 (Low), 5 (Lowest). 3 (Normal) is default if the field is omitted.
Warning, this is not a standard header, but most of SMTP support it. |
| subject |
string |
none |
false |
Subject of the mail. |
| content |
string |
none |
false |
Content of the mail. |
| for |
string |
none |
false |
Destination of the mail without writting it in the header (used to mention directly to the SMTP the reciever). |
| bcc |
string |
none |
false |
Bcc: Carbon Copy destination of the mail. |
| mime-message |
string |
none |
false |
Full content of the mail (can be usefull to build a specific email or forward an email).
The other fields can override this content. |
| cc |
string |
none |
false |
Cc: Carbon Copy destination of the mail. |
| notification |
boolean |
none |
false |
Set a notification flag that would ask the mail reader to deliver a message if the mail is opened. |
| attachement |
string |
none |
false |
URL of a file in the current site attached to the email (can be a local file or a remote url). |
|
| |
|
EXAMPLE
|
|
|
example 1
|
Simple text mail with 2 attachements.
<nvd:command name="smtp.send">
<nvd:parameter name="from">someone@cms.com</nvd:parameter>
<nvd:parameter name="to">someone@dest.com</nvd:parameter>
<nvd:parameter name="notification">true</nvd:parameter>
<nvd:parameter name="subject">My subject!</nvd:parameter>
<nvd:parameter name="content">Hello world</nvd:parameter>
<nvd:parameter name="content-type">text/plain</nvd:parameter>
<nvd:parameter name="attachement">/img/logo.gif</nvd:parameter>
<nvd:parameter name="attachement">/test/test.doc</nvd:parameter>
<nvd:parameter name="attachement">http://www.novadeck.com/test.doc</nvd:parameter>
</nvd:command>
|
| |
|
example 2
|
HTML mail retrieved from a fixed URL (http://www.novadeck.com).
<nvd:command exec-priority="1" name="http.request" url="http://www.novadeck.com" >
<nvd:result name="body" variable="mailcontent" />
</nvd:command>
<nvd:command name="smtp.send">
<nvd:parameter name="from">someone@cms.com</nvd:parameter>
<nvd:parameter name="to">someone@dest.com</nvd:parameter>
<nvd:parameter name="subject">See HTML content</nvd:parameter>
<nvd:parameter name="content"><nvd:variable select="mailcontent" exec-priority="1"/></nvd:parameter>
<nvd:parameter name="content-type">text/html</nvd:parameter>
</nvd:command>
|
|
|