|Description:||The active:sendmail service will send an email message via an SMTP gateway.|
sendmail is an accessor using Active URI syntax with the following base identifiers:
and the following arguments: (for more details on argument passing details see here)
|Representation (java.lang.Object)||SMTP configuration|
|Representation (java.lang.Object)||The declarative specification of the email header|
|varargs [varargs]||Any quantity||Representation (java.lang.Object)||Varargs allows an arbitrary number of additional unspecified arguments.|
The following verb is supported:
The response representation of this accessor for SOURCE requests is unknown.
This accessor throws no documented exceptions.
To use sendmail accessor you must import the module urn:org:netkernel:email:core:
When a request with the SOURCE verb is issued to
an SMTP protocol request is made to the SMTP server specified in
the optional config argument
to send an email specified in the required header argument.
The body will comprise one or more body parts, each of which is identified
by one or more additional arguments.
At least one additional body-part argument is required.
The declarative specification of the email header.
Specifies an additional attribute on the content-type when posting multipart messages. This value is used on the MultiPartMessage constructor for all parts. According to the javadoc...
"Some messaging systems provide different subtypes of Multiparts. For example, MIME specifies a set of subtypes that include "alternative", "mixed", "related", "parallel", "signed", etc."
"An application can directly construct a MIME multipart object of any subtype by using the MimeMultipart(String subtype) constructor. For example, to create a "multipart/alternative" object, use new MimeMultipart("alternative")"
So to post a message with both text/plain and text/html parts you'd want to ensure /email/multipartSubType==alternative - so that the mail client would recognise them as alternates and render the preferred form.
The resource res:/etc/SMTPConfig.xml will be requested if the optional config argument is not provided.
All additional arguments are processed as MIME message parts of a multipart message
and are added to the message.
Each body part resource is requested as a
If there exists an attachment declaration in the header with name corresponding to the argument then the filename in the message of the attachment is taken from the attachment declarations filename field.