decorative banner

Previous | Next               Table Of Contents > 6 Email notification > 6.2 Sending email

6.2 Sending email


The mailsend command is used to send an email message that has been created using the mailcreate command. The same email message can be sent to multiple recipients by calling this command multiple times with the email address of each recepient. The internet address of the mail server and the corresponding port number must be specified in addition to the recipient's name and email address. In most cases, these values can be obtained from your default email program. The mailresult predefined status flag is set to the predefined constant success if the command completed successfully.

An optional username and password may also be supplied if the mail server requires it. Many mail servers now implicitly require users to authenticate before sending mail. In these cases, the username and password used to read email from this server should be supplied.

The syntax is

mailsend <mail server address>, <server port>, <recipient name>, <recipient email> [, optional: <username>, <password>];

Some examples are

mailsend "mail.jdinc.com", 25, "Jim Jones", "jj@jj.com", "username", "pass"; #send email message

mailsend "mail.jdinc.com", 25, "Joe Smith", "js@js.com", "username", "pass"; #send same message to another recipient


Previous | Next