<< back to sysax.com Product page

6.3. 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.

Exhibit 6.7. Syntax of command for sending email

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

Exhibit 6.8. Examples for using the command for sending email

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