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

Method Description

SmtpRequest.send()

Send a request to an SMTP server/daemon.

Syntax

number = SmtpRequest.send()

Parameters

The 'SmtpRequest.send' method takes no parameters

Results

The 'SmtpRequest.send' method returns number:

Type/Value Range/Length Description
number   returns the SMTP protocol response code returned from the mail server. Typically '250' is a success code. See RFC2821, section 4.2.3 for a full list of codes.

Remarks

Build an email message and send to recipients.

Example

The following simple example reads the contents of the Whitebeam homepage (www.whitebeam.org) and extracts all the anchor tags with 'href' attributes. These links are then formatted into a simple HTML table.


var request = new SmtpRequest;

request.to=['test@yellowhawk.co.uk'];
request.from = 'joe@somewhere.com';
request.subject= 'Hi Joe!';
request.body='How are you doing?';
request.send();
               

A separate SMTP tutorial explains how to use the SmtpRequest object in Whitebeam

The method returns the SMTP response code from the mail system. 250 is a success code. A full list of codes can be found in See RFC2821, section 4.2.3.

Whitebeam release 1.3.36
(loadtime : 12ms)