How to send smtp mail from Navision 4.0

I would like to send a mail through smtp (using NAS).

I would prefer not to install any external components just use a Navision component and specify the smtp server and send the message.

Anybody knows if navision has a standard component for this and the commands ??

Parents
No Data
Reply
  • kml:

    I would like to send a mail through smtp (using NAS).

    I would prefer not to install any external components just use a Navision component and specify the smtp server and send the message.

    Hi,

    You don't need to install anything because SMTP is a network service native to Windows.  You simply add two OCXs as C/AL Global Variables:

    • Microsoft MAPI Messages Control, version 6.0
    • Microsoft MAPI Session Control, version 6.0

    Navision is only an application running on top of all these Windows and network services.  Though you could use Outlook Object Model to achieve the same, I would suggest that you stick w/ Windows native service.

    However you will always get this warning: "A program is trying to automatically send e-mail on your behalf.  Do you want to allow this?" and there is no way to turn it off.  You can learn more about MAPI in Microsoft KB and MSDN.

    Scott

Children
Related
Recommended