by James Bott » Wed Jun 28, 2006 9:05 pm
MAPI Mail Syntax:
DEFINE MAIL [ <oMail> ];
[ SUBJECT <cSubject> ];
[ TEXT <cText> ];
[ TYPE <cType> ];
[ DATE <dDate> ];
[ TIME <cTime> ];
[ CONVERSATION <cConversation> ]:
[ RECEIPT ];
[ FROM USER ];
[ FILES <cFilename1> ,<cDescript1>, <cFilenameN>, <cDescriptN> ] ];
[ ORIGIN <cOrigin> [ <cOriginAddress> ] ];
[ TO <cTarget1>, [ <cTargetAddress1> ] [ <cTargetN> [ <cTargetAddressN> ] ] ];
If the attachment file is html (has a .htm or .html extension) and you do not specify any TEXT (a message) then the file will appear in the message area.
ERRORS
If you specify a TO and the parameter is blank and you are using the FROM USER clause, the message compose box will not appear. Likewise if the filename is invalid or not found. It is best to use an error trap:
DEFINE MAIL...
ACTIVATE MAIL...
IF oMail:nRetCode!=0
MsgAlert("The message could not be sent due to an error."+CRLF+;
"MAPI error code: "+ltrim(str(oMail:nRetCode)),"Alert")
ENDIF