Microsoft KB Archive/106033: Difference between revisions
(importing KB archive) |
m (Text replacement - """ to """) |
||
Line 62: | Line 62: | ||
** m.subject- The subject line of the e-mail message. | ** m.subject- The subject line of the e-mail message. | ||
** m.notetext- The text of the e-mail message. | ** m.notetext- The text of the e-mail message. | ||
m.tonames= | m.tonames="johndoe" | ||
m.subject= | m.subject="MAIL TEST-A SAMPLE SUBJECT LINE" | ||
m.notetext= | m.notetext="THIS IS A TEST OF SENDING MAIL WITH FOXPRO." | ||
** create mapiRecip cursor | ** create mapiRecip cursor | ||
Line 78: | Line 78: | ||
MAPILIB('getdate'),'',0,RECCOUNT('mapiRecip'),0) | MAPILIB('getdate'),'',0,RECCOUNT('mapiRecip'),0) | ||
retval=mapilib( | retval=mapilib("sendmail",msession,"mapiMesg","mapiRecip",; | ||
"mapiFile",0) | |||
** Log off and cleanup | ** Log off and cleanup |
Latest revision as of 10:13, 20 July 2020
The information in this article applies to:
SUMMARYThe FoxPro Extensions that come with the Workgroup Templates enable FoxPro developers to tap into the mail messaging API (MAPI) and the Microsoft Schedule+ API (SPLUS).
MORE INFORMATIONThe FoxPro Extensions come with FOXMAPI.FLL, MAPILIB.PRG, and MAPIERR.PRG. FOXMAPI.FLL is a DLL that is the interface between FoxPro and MAPI.DLL and SPLUS.DLL. MAPILIB.PRG is a file containing procedures that make calls to functions in FOXMAPI.FLL (instead of calling the functions in FOXMAPI.FLL directly, parameters can be passed to MAPILIB.PRG, which provides extra error checking). MAPIERR.PRG is called by MAPILIB.PRG if an error condition occurs while a procedure in MAPILIB.PRG is being executed. ** START OF PROGRAM SET LIBRARY TO *: Calls: MAPILIB() (function in MAPILIB.PRG) *: : MPLOGOFF() (function in FOXMAPI.FLL) *: *: Uses: MAPIMESG.DBF ** SET THE LIBRARY TO FOXMAPI.FLL SET LIBRARY TO C:\wgtplate\appendix\foxpro\foxmapi.fll ** MAPILIB.PRG and MAPIERR.PRG must be in the same directory ** as this program for things to work properly. ** MAPILIB.PRG calls FOXMAPI.FLL ** Log on to mail msession=MAPILIB('LOGON') ** Get Info To Send ** m.toname- The e-mail name of the person the message is addressed ** to. ** m.subject- The subject line of the e-mail message. ** m.notetext- The text of the e-mail message. m.tonames="johndoe" m.subject="MAIL TEST-A SAMPLE SUBJECT LINE" m.notetext="THIS IS A TEST OF SENDING MAIL WITH FOXPRO." ** create mapiRecip cursor ** resolve name =MAPILIB('resolve',msession,m.tonames) ** send message =MAPILIB('newcursor','mapiFile') =MAPILIB('newcursor','mapiMesg') INSERT INTO mapimesg VALUES(0,m.subject,m.notetext,'IPM.',; MAPILIB('getdate'),'',0,RECCOUNT('mapiRecip'),0) retval=mapilib("sendmail",msession,"mapiMesg","mapiRecip",; "mapiFile",0) ** Log off and cleanup ** Logging off by directly calling the mplogoff function in ** FOXMAPI.FLL =mplogoff(msession,0,0,0) CLEAR ALL CLOSE ALL RELEASE ALL SET LIBRARY TO ** END OF PROGRAM Additional query words: FoxWin 2.50 email application programming interface Keywords : kbcode FxtoolLck Version : 2.50 2.50a 2.50b Platform : WINDOWS Issue type : |
Last Reviewed: August 8, 1999 |