Nav Fax, Mail, PDF, Docuware, Archive from any Navision

Nav123: Navision, Showare, OrderApp

Print Friendly, PDF & Email

This function is particularly aimed at users of the native Navision versions (Navision Classic Client). To create PDF documents from Navision 3.53, Navision 3.56 (both the blue DOS versions), Navision 2.01 via Navision 4.03 to Navision 2009R2, a little trickery was required. With my extension, however, this is no longer witchcraft: A multilingual mail text with placeholders (text modules) can be defined for each table (order header, invoice, reminder, purchase order...). This means that your "old Navision" can already do more than the new Navision, i.e. RTC or Navision / Business Central 365, because of course the appropriate email address can also be transferred at the same time, even with a selection from the contact table if desired. Of course, this is also possible in Navision RTC and Business Central 365, but in a completely different way.

To this day, however, there are always problems with SMTP mails from Standard Navision or Business Central. As a rule, these can only be avoided with external mail solutions such as BLAT and Cmailer.

Since Navision or Business Central from the RTC Client, especially with the web client, I recommend working with SMTP mail and the Business Central mail solution first. Only when this reaches its limits should you think about my solution with external mailers such as BLAT and Cmailer.
-Unlimited number of mail recipients. This applies to receivers, CC (carbon copy) and BCC (black carbon copy).
-Unlimited number of file attachments
-Unlimited body length, also as HTML. No restriction to 250 characters, 1024 characters, 2048 or 4096 characters. These are the different internal string sizes of the native Navision.
-Unlimited support of StartTLS/SSL via SMTP
-Any sender (if your mail server allows this)
E.g. for mailings, serial mails, different senders for invoices, offers, newsletters...

Even today, the Navision and Business Central internal SMTP does not map everything together.

Attention! My solution explicitly requires access to the file system, as the connected mailers BLAT and Cmailer are command line mail programs. Therefore, this solution is in no way and never will be compatible with the real Azure cloud solution & extensions from Business Central,and for technical reasons never will be. However, this is not even necessary, as most of the functions can be mapped in the standard Navision anyway. And there is already a workaround for the rest.

You will find the instructions for the command line mailers BLAT and Cmailer for Navision & Business Central at the end of this article. The following part describes the integration of PDF creation in the native Navision versions, i.e. everything (including Navision 3.53, Navision 3.56 and the Windows versions 2.01, 2.60, 3.01 etc. up to the 2009 R2 version (Classic Client). This is no longer necessary from RTC onwards, as Navision can create real PDFs internally and natively from these versions onwards. Not very good from a technical point of view, but that is not the issue here.

Note: "Faxing" directly from Navision incl. automatic entry of the recipient fax number in the fax program depends of course on the fax server. I currently only actively support David from Tobit. But this is also possible with Ferrarifax. But! An important but! Do you really still want to use fax? Those days are actually over, so I no longer offer fax as a blanket solution, but only after clarification in individual cases.

Mail from Navision Classic Client (up to 2009R2)

Attention! The PDF printer driver from Microsoft described here is only available from Windows server versions 2016 and upwards, or from Windows 10 and upwards. For Navision on older Windows versions, I recommend my still available but no longer documented solution via the Ghost-Script conversion path + Postscript printer driver. This applies to the Windows clients on which Navision is running, not the server!


The central print function is called up with CTRL+P (Rrint).

Print on Paper - Selection via the normal Navision print dialog including page view.
If Docuware is integrated, the document has already been transferred to Docuware at this point.
Mail - Mail to the displayed email address. If an email address exists, the selection is already pre-assigned with Mail.
Fax - If David (Tobit) is installed, the document can be sent directly to the specified fax number. If a fax system is installed and no mail address is specified, fax is preselected.
Interactive Mail - Here, the finished document is prepared together with the mail text into a mail. This mail can be changed by the user and provided with additional mail addresses. If other contacts with mail addresses are stored for the contact for this customer or vendor, Navision first opens the contact selection. You can select any contacts here. Navision transfers the associated email addresses to the interactive email. Attention! This option depends on the specific implementation and agreement, and is absolutely dependent on Outlook 32 bit for the editable mail. However, the mail address selection from the contacts can also be carried out with any other mail system, including BLAT Mail and cmailer.

Installation of the necessary Windows/Navision PDF driver

Please call up the Windows features: CTRL+ESC, type in "Feature":

Call up the Windows features with CTRL+ESC (fastest way)

Please check here whether the "Microsoft Print to PDF" feature is activated. Note: If this driver is not available later when you select the Microsoft PDF printer driver "Microsoft Print to PDF", please deactivate this feature, restart Windows and reactivate this feature. It sometimes happens that Windows simply "forgets" this printer driver and it is therefore not available.

Windows feature Microsoft print output in PDF

Now please create a new printer with the name NavisionPDF and the printer driver Microsoft Print to PDF

To do this, please press CTRL+ESC again and type "Printer" directly. Open "Printers & scanners". Click on "Add printer or scanner". After a short wait, "The desired printer is not listed" appears. Please click on this text. "Search for a printer using other options" appears. Please select the option "Add a local printer or network printer with manual settings" & Next.

The following appears Select a printer port. Please choose Create new connection and the connection type Local Port and press next.
Please enter C:\Temp\NavPdf\Navision.pdf in the text box that opens.
Achten Sie bitte darauf, hier auch gleich im Explorer den Ordner c:\temp\NavPdf anzulegen!
The desired PDF driver is NOT available at this point! Please select any Microsoft driver, e.g. Microsoft PCL5 Class Driver (but this is 100% irrelevant!), and click next.
Bitte beachten Sie die Abweichung beim Anschlussnamen zu dem Screenshot, dieser zeigt eine ältere Version.

Enter a printer name: Printer name: NavisionPDF & next.
Do not release printer.
Checkbox Set as default printer deactivate & finish.

The new printer appears in the printer list. Please click and select Manage , then "Printer properties", then the tabAdvanced. You can now select the Microsoft Print to PDF driver. If this driver is not available for selection, please uninstall and reactivate the Microsoft feature as described above.

"Normally" it would also be necessary to activate the option "Send print jobs directly to printer". This would significantly speed up the entire PDF handling under Navision. The old version using Ghostscript is actually faster on some computers than this new solution here. Unfortunately, the suitable printer drivers (no XPS, no GDI, color-capable, preferably A3-capable...) are gradually dying out (being withdrawn from support by Microsoft). Therefore, this is the only elegant, future-proof, remaining possibility to create PDFs directly from Navision. If you are still using the old Navision to PDF version based on Ghostscript, please contact me about switching to Microsoft Print to PDF. Likewise, if you have authorization problems with your mail server with the BLAT.exe. In this case, we should also convert your Navision PDF&Mail solution to Microsoft PDF generation and the more modern CMailer. Blat is obviously not being further developed.

Important when setting up the printer: The printer must NOT have an entry of this type "This device has various functions"!
This occurred once with a customer, I could not reproduce this and unfortunately I do not have a screenshot of it.
It looked something like this:

However, instead of EPSONxxxx there were the entries Microsoft Pint to PDF, Navision PDF and the originally selected printer driver.
If your "Navision PDF" printer displays this selection, you must delete it and create it again. In my experience, there is no way to repair this installation.

The logic required for this (waiting until the PDF is ready, renaming to a sendable document) now takes place entirely within my Navision function.
Advantage: Ghostscript is no onger required for this, so the entire update and version management for Ghostscript is no longer necessary. This only applies to the mail solution! If you use tools from me, e.g. to split several PDF pages into individual PDFs, or to combine individual PDFs into one large document, to include watermarks or forms in the PDF, then Navision still needs Ghostscript for this.

Setup in Navision

You should now set up the text modules IF you want to use them.
You can find these under Administration/Application Setup/General/Financial management/Standard text codes

Screenshot aus Navision2009 Classic Client für Einrichtung der Textbausteine für Mailbestellungen/Mailrechnungen/Mailauftragsbestätigungen direkt aus Navision heraus
Maintenance of text modules in Navision 2009 Classic Client for order confirmations, purchase orders, invoices by e-mail directly from Navision. You may also use HTML_Codes here.
The codes of the mail texts are made up of MT for MailText, the table number (110 = sales delivery header) and, in the case of mixed tables such as 36 and 38 (sales header or purchase header), an appendix to distinguish between the different document types. These document types are fixed in the program code and must therefore be used exactly as shown in the screenshot.

Einrichtung in den Firmendaten:

Batchmail URL ist der komplette Fad inkl. Programmdateiname zu ihrem Cmail, in meinem Fall ist das z.B. C:\Program Files\cmail.exe. Blat wird in der aktuellen Version nicht mehr unterstützt, sprechen Sie mich bitte an, wenn Sie Blat benutzen möchten.
The SMTP Adresse ist die URL Ihres Mailservers.
SMTP User & Password: Die Zugangsdaten zu Ihrem Mailserver. Ebenso der Port.

Batchmail BCC To: Wenn Sie hier eine Mailadresse eingeben, wird jede von Navision versendete Mail auch noch als Blinkopie (Blind Carbon Copy) an diese Mailadresse weitergeleitet. Das ist z.B. praktisch um einen extra Ordner in Ihrem Exchange oder Outlook oder Ihrem Archivsystem mit den Duplikaten der rausgegangenen Mails zu füttern.
Bacthmal umleiten zu:  Das ist sehr praktisch für die ersten Tests. Wenn Sie hier eine Mailadresse eintragen, so wird jede Mail, die Navision senden will, statt zum „richtigen“ Empfänger an eben diesen Empfänger umgeleitet. So können Sie die Ersteinrichtung in Ruhe testen, ohne ihre Kunden zu nerven.

Batchmal Debuglevel:
Leer: Es erscheint nur ein kurzes DOS Fenster beim Senden.
Einfach: Es erscheinen einige kryptische Meldungen, die einem verraten können, wo es bei einem Klemmer hakt.
Ausführlich: Navision listet jedes einzelne Byte auf, welches es mit ihrem Mailserver austauscht.
Einrichtung = Ausführlich, Echtbetrieb = leer.

Setting up Blat or Cmail

Simply copy the current BLAT files (blat.dll, blat.exe, blat.lib, blatdll.h) to the folder C:\Program Files\Blat64 or any other folder (including network folders). You can specify in the company data where the corresponding Blat.exe can be found.
Attention! Blat can handle HTML mails, any number of attachments, any number of recipients, and is therefore an ideal partner for serial mails directly from Navision.
However, Blat is not capable of Starttls (SSL/TSL) and is therefore somewhat behind the times. As of today, BLAT will no longer learn these little tricks. Therefore, my Navision Send PDF Mail solution is now preferably offered with the mailer program CMail.

Cmail consists of just a single file (cmail.exe). Please copy this e.g. to the folder C:\Program Files\ or any other folder (including network folders). You can specify in the company data where the corresponding cmail.exe can be found. Cmail also supports
-Any number of recipients (receivers), CCs, BCCs per mail
-free senders (if your mail server also allows this)
-Any number of file attachments.
-Mail texts (bodies) of any length, even beyond the 1024, 2048 or 4096 (4095) characters of Navision SMTP Mail. Just like BLAT.

And this alone makes Blat and Cmail with my interface more powerful and easier to use than the Navision / Business Central integrated SMTP mail interface.

In addition, Cmail also handles SSL/TLS (StartTLS) logins. Note: For GMail, none of the solutions offered, not even the Navision / Business Central internal SMTP mail, is the first choice. Or, better, vice versa: Gmail with its OAuth is very complicated and insecure to access via programs such as Navision / Business Central. With the planned 2-factor authorization, GMail will no longer be used as a mail server for mailer programs. The technical background to this can be found in the discussion on Cmail:

Support for OAuth2 in CMail hasn’t progressed much beyond the an initial investigation. There are several reasons for this, including a lack of suitably licenced C implementations. I was considering my own implementation, however, when I looked into the details, it seemed implementing OAuth2 would create more issues than it would solve.

OAuth2 adds a dependency on HTTPS as there is no token exchange mechanism within SMTP itself. While this likely isn’t a big deal for most users, there is a need to reauthenticate applications periodically, including after a password change in the case of Google. For a tool which is designed to send notification e-mails without user interaction, this is problematic as it will eventually fail, silently. Further, OAuth2 also puts users at the mercy of the service provider, who may rate limit access to their API (Google does this) and could at any time decide that CMail doesn’t meet their standards and break it for everybody.“