Sending E-mail using Lotus notes

I would like to send e-mail from Navision (User desktop) using the lotus notes on the server (Domino). The Navision system needs to send e-mails to the managers. The standard Navision e-mail codeunit ask (at run time) for a password and profile. I would like to automate the procedure.

make a search for LOTUS NOTES on the forum. this discussion ist just a few weeks old

Hi, Can someone please help me. I’m also using Automation to send an email from Navision via Lotus Notes, with the examples on this forum I am able to create a message which is stored in my drafts-folder. I still need to know how to attach a file and send the email, can someone give me an example how to do this. Thanks in advance.

Hi Fred, please Post your code, maybe then it´s easier to help you. regards Bastian

Hello Bastian, This is my code NotesDocument := NotesDatabase.CREATEDOCUMENT(); NotesDocument.APPENDITEMVALUE(‘Form’,‘Memo’); NotesDocument.APPENDITEMVALUE(‘Subject’,‘Test’); NotesDocument.APPENDITEMVALUE(‘SendTo’,‘email-address’); NotesDocument.APPENDITEMVALUE(‘Body’,‘This email is generated by Navision’); NotesDocument.GETATTACHMENT(‘c:\temp\test.doc’); NotesDocument.SAVE(1,1); kind regards, Fred

Maybe a little off topic but you can use create e-mails using your default windows mail program by using the SHELL command and send this string: ‘ is your subject&body=Type here your message text’ You will avoid the trouble with automation. I think it should work with Lotus as well. 2 disadvantages: - you can’t add attachements - the user gets to review the message and manualy has to click the ‘send’ button.

Intoint ( has a tool for integrating Navision/Attain with Lotus Notes (Mail, calendar, to-do’s, contacts and more). Further information on

We have done several LaserNet installations which automate distribution of documents (MBS via Notes). This means that we from the MBS solution very easy controls which customers/manager needs to have there e.g. statement, invoice etc. via email, Fax, XML etc. LaserNet will automatically set up the graphical layout etc, convert it into PDF (mail) and send it with this attachment. I have a ScreenCam which I can send, so you can get an impression about how this works. - Otherwise visit and read more.

Hi fred! I am having the same problem, do you solved it?

Hello Magnus, I could not get this working, so I am using PDF995 now to create and send documents. Fred

Hi, if you use Automation Objects from Lotus Notes to attach a file you have to create a “NotesRichTextItem” in your mail document and use “NOTESEMBEDDEDOBJECT” to attach a file. It works without problems [8D] “getAttachment” only returns a “NotesEmbeddedObject” representing the attachment in a Notes document. I’m sorry that I didn’t read you message earlier… Katrin

Hi All, Just to note, a simple solution on the Lotus issue is to use the standard MAPI automation that ships with every Navision client. CLEAR(MAPIHandler); CREATE(MAPIHandler); ErrorNo := 0; MAPIHandler.ToName := ToName; MAPIHandler.CCName := CCName; MAPIHandler.Subject := Subject; IF Body <> ‘’ THEN MAPIHandler.Body := Body; MAPIHandler.AttachFileName := AttachFileName; MAPIHandler.OpenDialog := OpenDialog; MailSent := MAPIHandler.Send; ErrorNo := MAPIHandler.ErrorStatus; the only other setup issues would be to setup every client PC, to default to send via Lotus notes. Cheers

Indeed. It has always been possible to send e-mails from Navision through Lotus Notes - as long as Lotus Notes has been assigned as the default MAPI mail client. This is true, if you do not need to send mails without user-interaction (user has to press SEND on each mail). Problems ocure, when trying to send reports as attachments, as the filename is corrupted (and of course if you want to send mails without UI).