开发者

VB6 with MAPI for Lotus Notes

Everybody,

I need to incorporate mail functionality into a VB6 application. The default mail system is Lotus Notes 6.5. I have read that this version of Lotus Notes is MAPI-enabled.

Here is a weird thing I see. When the user clicks a SendMail button, the below code is launched:

 MAPISession1.SignOn
With MAPIMessages1
    .Sess开发者_运维百科ionID = MAPISession1.SessionID
    .Compose
    .RecipAddress = "John Smith"
    .MsgSubject = "Test memo"
    .MsgNoteText = "This is testing data!"
    .AddressResolveUI = True
    .ResolveName
    .Send True
End With

This code opens a window in Lotus Notes (this is what I expected) but - the To address box contains the recipient address followed by the body text on the first line and the recipient address on the second line:

John SmithThis is testing data!
John Smith

-- the Body section is blank.

Is there anything I can do to fix it or Lotus Notes is incompatible with MAPI.

Thanks, Lev


I don't have access to the appropriate tools, so I can't test this, but try moving the .ResolveName line up right after you set the recipient address, like so:

.Compose
.RecipAddress = "John Smith"
.ResolveName

Lotus Notes is compatible with Simple MAPI, not full (extended) MAPI, but the code you're using appears to be Simple MAPI.


I did a quick bit of research and supposedly Simple MAPI is supported in Lotus Notes 6. However, a little more digging led me to this post where someone had trouble using MAPI in r6, and opted to use COM instead. I've only worked with COM, but I can say it does give you a lot of flexibility if you're up for changing your code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜