Problems sending mails using MAPI and Lotus Notes

alexjensenalexjensen Member Posts: 41
I'm using Lotus Notes as mail program. The NAV version is 5.0 SP1. If I use the "NewMessage" function in CU397, nothing happens (NAV olhandler.dll). But if I use the old MAPI automation and code from earlier Financials versions it normally works on Notes as well (besides the OpenDialog setting).

Now when NAV creates the mail using MAPI, the subject text i placed in the "To" field in the Lotus Notes mail. Also the e-mail address is placed twice in the "To" field instead of only once. The subject text is placed OK in the "Subject" line.

It has worked before on my PC so I don't know if it has anything to do with installation of 5.0, a newer MSMAPI32.OCX or ? I have tried to replace the MSMAPI32.OCX with older ones with the same result.

Any help?

Thanks

AJ

PS: If You cannot help me with the problem above, maybe You have an idea to work around it. Because the "old" MAPI didn't allow me to send mails without manually sending from the message window in Notes I also have a function using Notes automation. I looks like this:


CLEAR(NotesSession);
CLEAR(NotesDatabase);

CREATE(NotesSession);

NotesDatabase := NotesSession.GETDATABASE('','');
NotesDatabase.OPENMAIL;

NotesDocument := NotesDatabase.CREATEDOCUMENT();
NotesDocument.APPENDITEMVALUE('SendTo',ToName);
NotesDocument.APPENDITEMVALUE('CopyTo',CCName);
NotesDocument.APPENDITEMVALUE('BlindCopyTo','');
NotesDocument.APPENDITEMVALUE('Subject',SubjectText);
NotesDocument.APPENDITEMVALUE('Body',BodyText);

IF AttachFileName <> '' THEN BEGIN
NotesRichTextItem := NotesDocument.CREATERICHTEXTITEM('Attachment');
NotesRichTextItem.EMBEDOBJECT(1454, Dummy, AttachFileName);
END;

NotesDocument.SAVEMESSAGEONSEND(1);
NotesDocument.SEND(0);

I will open the Lotus Notes mail, create a new message, fill in the message, send it and save it in "Sent items". If I could get this function to open the mail instead of sending it directly it would be a nice solution to my problem. But I can't seem to find a method to open the mail (make it visible) before sending :(
Sign In or Register to comment.