Whitebeam Object Definition

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Whitebeam Object Definition

SmtpRequest Object Description

This is a fairly simple JavaScript class used for the generation of SMTP email messages. The object basically consists of a number of optional fields that can be provide and a single method - 'send()' - to format and send to e-mail to a remove (or local) SMTP daemon.

More details of this feature can be found in a tutorial dealing with this specific topic.

Methods

SmtpRequest.send() Send a request to an SMTP server/daemon.

Aggregate Types

SmtpRequest.SmtpBody An SMTP header comprising a name and a value pair.
SmtpRequest.FailedRecipient Represents an email recipient to which a message could not be delivered

Object Properties

Name Type/Value Range/Length Description
operationnumber  Optional, default = SmtpRequest.sendToValid
Determines the behaviour of the send() operation. Options are :
  • SmptRequest.sendToValid (default)
    Validates all addresses. Any invalid addresses are reported but the email is sent anyway to all valid addresses
  • SmptRequest.abortOnAddressError
    Validates all addresses. The email is sent only if all addresses are valid. If any addresses are invalid then the operation is cancelled - no email will be sent
  • SmptRequest.validateAddresses
    All target email addresses are validated through the mail server and 'bad' addresses are reported. Email is never sent.
subjectstring  Required. The subject line for the email.
fromstring  Required. The from email address for the email.
senderstring  Required. The from email address for the email.
replyTostring  Required. Value for the 'Reply-To' header.
toarray of strings  Optional. An array of email addresses. Unless the message has 'rawData' set the contents of this field populates the 'To' field in the email generated. If the 'envTo' property is empty then this field is aggregated with 'cc' and 'bcc' to generate the actual set of recipients for this message.
ccarray of strings  Optional. An array of email addresses. Unless the message has 'rawData' set the contents of this field populates the 'Cc' field in the email generated. If the 'envTo' property is empty then this field is aggregated with 'to' and 'bcc' to generate the actual set of recipients for this message.
bccarray of strings  Optional. Blind copy. An array of email addresses. If the 'envTo' property is empty then this field is aggregated with 'to' and 'cc' to generate the actual set of recipients for this message.
rawDatabool  Optional, default = false
If this flag is 'true' then the Presentation Engine takes the contents of the 'defaultText' field as both the headers and the body (i.e. the Presentation Page has full control over the e-mail data. Note that in this case the 'defaultText' field is mandatory.
bodyarray of struct SmtpRequest.SmtpBodyssee definition Required. One or more body segments. This can be an array object or a single object. Each object maybe either be a binary object or will be converted to a string.
defaultTextstring  Optional.

This text field is used in one of two ways:

  1. If the message has a multi-part encoding then this property is inserted into the message before the start of the first part.
  2. If the 'rawData' flag is set to 'true' then this property contains the entire data for the email- both the headers and the body. The only thing the presentation deals with is generation of the email envelope.

In all other cases this property is ignored.

multipartstring  Optional, default = mixed

*If* the email generated is determined to have a multipart content (the body property is an array with more than one element) then this property deterimes the sub-type of the content type. So for example if this property is set to 'alternate' then the Content-Type header will contain 'multipart/alternate'.

headersMetaData  Required. Set of headers to send to the server. Each property on this object is a header name and the value is the header value.
HELOstring  Required. Use a specific domain name in the HELO (or EHLO) request to remote servers. By default the systems host name will be used.
useDSNbool  Optional, default = false
If set to 'true' when 'send()' is called will request that the receiving system provide "Delivery Service Modifications". The SmtpRequest class will interrogate the following attributes to further refine the DSN request: notifyFail; notifySuccess; notifyDelay; returnBody; envID;
notifyFailbool  Optional, default = true
The receiving server should return a DSN report if delivery fails.
notifySuccessbool  Optional, default = false
The receiving server should return a DSN report if delivery succeeds.
notifyDelaybool  Optional, default = false
The receiving server should return a DSN report if delivery is delayed.
returnBodybool  Optional, default = false
The receiving server should return the entire message body in any DSN report sent.
envIDstring  Required. If useDSN is true then the string value of this property will be used as the 'envelope ID' for the outgoing message. This should then be returned in any correctly formatted DSN respnse. An application can place a value in this property that allows it to subsequently map the DSN response to a specific outgoing message.
envFromstring  Required. Specify a value for the 'envelope-from' header. This address overrides the target address to which bounce/DSN messages will be sent. In conjunction with DSN this allows application software to automatically process bounce messages and facilitates automated list management and cleaning.
failedRecipientsarray of struct SmtpRequest.FailedRecipientssee definition Required. One or more body segments. This can be an array object or a single object. Each object maybe either be a binary object or will be converted to a string.

Whitebeam release 1.3.36
(loadtime : 16ms)