Home     Tour     Features     Order     Support     Contact  
 
 

AY Mail API

[Corporate Edition Only]
You can use user macros to let a third party software process the recipient information and generate all or part of the message. The information below describes how to build your own DLL to do custom message generation.

This text requires programming skills and is not suitable for a regular user.

When AY Mail encounters the User macro, it loads the specified DLL through the call to LoadLibrary(), then loads the specified function in the DLL and calls the function. The function must be exported from the DLL and must have the following prototype:

BSTR WINAPI UserMacroProc(
LPCSTR pszEmail, // Recipient's email address
int iCount, // Number of data fields known for the recipient
LPCWSTR* ppwcsName, // Array of data field names
const VARIANT* pvValue) // Array of data field values

pszEmail

Specifies the recipient's email address. The DLL cannot modify this information.

iCount

Specifies the number of data fields known for the recipient. May be 0. If it is 0, the ppwcsName and pvValue parameters must be ignored.

ppwcsName

Pointer to an array of Unicode strings specifying data field names. The DLL cannot modify this information. Only iCount first fields is valid. If iCount is 0, the parameter must be ignored.

pvValue

Pointer to an array of variants specifying values for data fields. The DLL cannot modify this information. Only iCount first fields is valid. If iCount is 0, the parameter must be ignored.

The function must return a Unicode String allocated with SysAllocString() or similar function. AY Mail shall free the string. The text returned by the function will be inserted into the message. This text cannot contain any other macros. If the function returns NULL then no text will be inserted. The function may also return one of the special values:

(BSTR)(-1) An error occured. The sending must be aborted.

(BSTR)(-2) The macro requests abort. The sending must be aborted.

(BSTR)(-3) The current recipient must be skipped. The sending should continue.

AY Mail Installer installs a source code sample UMSAMPLE.C into AY Mail directory.



 
   
 Home     Tour     Features     Order     Support     Contact  

Copyright © 1995-2014 Northern Software Inc. All Rights Reserved