The WinMail API

The WinMail API is based on the front call technique as described in Front End Functions. All WinMail functions are grouped in the WinMail front end function module.

Table 1. WinMail API functions: General
Function name Description
Init This function prepares a message
Close This function closes the message
SetBody This function sets the body of the mail
SetSubject This function sets the subject of the mail
AddTo This function adds a "To" addressee
AddCC This function adds a "CC" addressee
AddBCC This function adds a "BCC" addressee
AddAttachment This function adds an attachment
SendMail This function sends the mail
GetError This function retrieves the last error message

The following functions are needed when you use SMTP server connections:

Table 2. WinMail AIP functions: SMTP-specific
Function name Description
setSmtp This function sets the SMTP server to use
setFrom This function sets the sender address