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, do not the server!
The central print function is called up with CTRL+P (Print).
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":
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.
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.
Please note the difference in the port name compared to the screenshot, which shows an older 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:
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
Entry in the company data:
Batchmail URL is the complete thread including the program file name for your Cmail, in my case that is, for example C:\Program Files\cmail.exe. Blat is no longer supported in the current version, please contact me if you would like to use Blat.
The SMTP Adresse is the URL of your mail server.
SMTP User & PasswordThe access data for your mail server. Also the port.
Batchmail BCC To: If you enter an e-mail address here, every e-mail sent by Navision will also be forwarded as a blind carbon copy (BCC) to this e-mail address. This is useful, for example, for feeding an extra folder in your Exchange or Outlook or your archiving system with the duplicates of the outgoing e-mails.
Redirect Batchmail to: This is very useful for the first tests. If you enter an e-mail address here, any e-mail that Navision wants to send will be redirected to this recipient instead of going to the “real” recipient. This allows you to test the initial setup in peace without annoying your customers.
Batchmail Debuglevel:
Empty: A DOS box appears briefly during sending.
Simple: Some cryptic messages appear that can tell you what the problem is if something jams.
Detailed:Navision lists every single byte that it exchanges with your mail server.
Setup = detailed, live operation = empty.
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:
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.“