MAPI, Outlook and attachments (OpenInsight 32-bit Specific)
At 10 APR 2011 10:18:29AM Bob Silverstein wrote:
I am trying to use MAPI and Outlook to send emails with multiple attachments but the files do not attach. I know this has been discussed but I do not see a clear solution to this problem. Here is the relevant code. It attaches a single file just fine, just not multiples.
What am I missing? Thanks for the help.
Flags=MAPI_DIALOG$ + MAPI_NEW_SESSION$
Message='
Message= SUBJECT : {S_SALES_PERSON} : ' at FASTSIGNS.'
Message=GET_PROPERTY(@WINDOW : '.EMAIL', 'TEXT')
Message=74@fastsigns.com"
Message=TEXT
Message=Flags
Message=IPM.Microsoft Mail.Note"
Message=FILES; value mark delimited list
Message=PATHS; value mark delimited list
Message= Len(Message) - 2
If MAPILogon (session, @window,user, password, MAPI_LOGON_UI$ + MAPI_NEW_SESSION$) Then
If MAPILOGON (SESSION, @Window=Outlook Internet Settings', '') Then
Msg(@window, "Mail login successful!" : @vm : session)ENDEnd ElseGet_Status(ErrMsg)Msg(@window, 'Cannot log on' : @vm : ErrMsg)End
If MAPISendMail(session, @window, Flags, Message) then
Msg(@window, "Message sent successfully!")End ELSEGet_Status(ErrMsg)IF ERRMSG NE 'OIMAPI01 : User aborted function' THENMsg(@window, 'Message not sent.' : @VM : ErrMsg)ENDEnd