Problems sending mails using MAPI and Lotus Notes

alexjensen
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
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

0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions