SendMail.send()

NES3+Syntax

							sendmail.send()

Description

The send() method of the SendMail objects attempts to send the email from the value specified in the From property to those specified in the To, Cc, and Bcc properties through the email server specified in the Smtpserver property. This method returns true if successful and false otherwise.

Example

Listing 8.128 tries to send a message. If an error occurs when trying to send the message, an error message is written to the user's page.

Listing 8.128 Sending a Message with the send() Method
 <SERVER> // Try to send an instance of the mail if(!myMail.send()){ // If there was an error, give the user the email address of whom they // should contact about the error, as well as the error code ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.