Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
*** Make sure we have a MAPI session established
lnSessionID = THIS.CreateSession( toSendParms.cUserName, toSendParms.cPassWord, toSendParms.lDownload )
IF lnSessionID > 0
*** Create message and send it
WITH THIS.oMessage
.SessionID = lnSessionID
.Compose()
*** Make sure we have enough room to add the attachments on to the end of the body
.MsgNoteText = toSendParms.cBodyText + CHR(13) + CHR(13) + ;
SPACE( ALEN( toSendParms.aAttachments, 1 ) + 2 )
.MsgSubject = toSendParms.cSubject
.MsgReceiptRequested = toSendParms.MsgReceiptRequested
*** Add the recipients
*** The e-mail address is column 1
*** The recipient type is column 2
FOR lnCnt = 1 TO ALEN( toSendParms.aRecipients, 1 )
.RecipIndex = .RecipCount
.RecipDisplayName = ALLTRIM( toSendParms.aRecipients[ lnCnt, 1 ] )
.RecipType = toSendParms.aRecipients[ lnCnt, 2 ]
ENDFOR
*** Finally add the attachments
*** find the correct position for the first one
lnPos = LEN( toSendParms.cBodyText ) + 3
IF NOT EMPTY( toSendParms.aAttachments[ 1 ] )
FOR lnCnt = 1 TO ALEN( toSendParms.aAttachments, 1 )
.AttachmentIndex = .AttachmentCount
.AttachmentPosition = lnPos
.AttachmentName = JUSTFNAME( ALLTRIM( toSendParms.aAttachments[ lnCnt ] ) )
.AttachmentPathName = ALLTRIM( toSendParms.aAttachments[ lnCnt ] )
lnPos = lnPos + 1
ENDFOR
ENDIF
*** All systems go: send the e-mail
*** An argument of 1 will open client to manually send composed message
.Send( 0 )
*** Sign off
This.oSession.SignOff()
ENDWITH
ENDIF