Structures, Variable, Functions – AMX i!-EquipmentMonitor User Manual

Page 12

Advertising
background image

Running i!-EquipmentMonitor

8

i!-EquipmentMonitor

Structures

The following defines an i!-EquipmentMonitorOut.axi structure:

Structure _sSMTPMessage

{

CHAR cDate[SMTP_LINE_MAX];

CHAR cSource[SMTP_USER_MAX];

CHAR cDest[SMTP_USER_MAX];

CHAR cSubject[SMTP_LINE_MAX];

CHAR cMessage[SMTP_MSG_MAX];

CHAR cFile[SMTP_LINE_MAX];

}

Variable

The following is an i!-EquipmentMonitorOut.axi variable:

VOLATILE

CHAR

bSMTPDebug Set to 1 to enable debugging

Functions

The following are a list of i!-EquipmentMonitorOut.axi functions:

i!-EquipmentMonitorOut.axi Functions

SmtpQueMessage

Call this to send an
e-mail message.

Syntax:

SLONG SmtpQueMessage(CHAR Source[],CHAR Dest[],CHAR

Subject[],CHAR Message[],CHAR File[])

SmtpQueMessage has these arguments:

Source:

String containing the senders e-mail address.

Dest:

String containing the recipients e-mail address or addresses.

Subject:

String containing the subject of the e-mail.

Message:

String containing the message body of the e-mail.

File:

String containing the ASCII (text) only file name to attach to the e-mail.

SmtpQueMessage returns these values:

-1:

If the message was not successfully queued for sending.

>0:

If the message was successfully queued for sending.

Example:

SmtpQueMessage('[email protected]','[email protected]',

'Wild Nights',

'Are they calling?','')

Remarks:

SmtpQueMessage

should be called if you want to send a message. The To parame-

ter can contain multiple addresses separated by a ";". The file parameter is the path
and file of an ASCII (text) only file contained on the master's file systems. This file is
transmitted as an attachment.

Advertising