Qlik Community

Ask a Question

Qlik NPrinting Documents

Documents related to Qlik NPrinting.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW

PowerShell Script to test SMTP settings

Support
Support

PowerShell Script to test SMTP settings

Starting from Qlik NPrinting November 2017, you can check your SMTP settings using an in-built feature: https://help.qlik.com/en-US/nprinting/November2017/Content/Setup/HowSetUpE-mailNPrinting/Set-up-emai...‌‌.

Unlike NPrinting 16, version 17.x does not have an option to test the entered SMTP settings. You could run the attached PowerShell script to test your SMTP settings before entering them into NPrinting. You will need to make minor changes like specifying the SMTP server address & port number etc. The lines that need changing are listed in the comments at the beginning of the script.

Note:

You may need to  set the execution policy to Unrestricted. To do that, first open Windows PowerShell Modules:

Then:

1. run the PowerShell Cmdlet Get-ExecutionPolicy - make a note of the policy

2. run the PowerShell Cmdlet Set-ExecutionPolicy Unrestricted

3. Don't forget to revert to the original policy (noted in point 1) after running your tests.

HTH - Daniel.

Tags (1)
Labels (1)
Attachments
Comments
Partner
Partner

Hi Dear djk

Thanks for this wonder full document i always test the mail with a  task, create an App Express in QV (Ctrl Q Q Egg), two or thre charts and one Word Report.

Thank you so much

0 Likes
Not applicable

Hi Daniel,

You can set the Powershell Execution Policy on the process only:

PS> Set-ExecutionPolicy -Scope Process -ExecutionPolicy Unrestricted -Force

This way you don't be able to forget to set it back .

And for the script: it's better to put all variables on top so you can assign them directly without editting your script:

Param(
     [string] $SmtpServer = "smtp.gmail.com"
     , [bool] $EnableSSL = $true
     , [int] $Port = 587
     , [Parameter(Mandatory=$True)][string] $EmailAddress
     , [Parameter(Mandatory=$True)][string] $Password
)

With regards,

Egbert

Partner
Partner

Thank you djk‌, this script has been very useful!

Partner
Partner

I follow every single step and run the script get in this result.

SMTP Server: ##### Port #: XXX SSL Enabled? False

SENT

EVERYTHING PASSED

And make my email test on QNPrinting configuration and still send me this message..

Email not sent. Check your email configuration.


Is there any step that I missed?



0 Likes
Support
Support

Hi Conrado,

I suggest that you upgrade NPrinting to a more recent version. Since version November 2017, you can check your SMTP settings using an in-built feature: https://help.qlik.com/en-US/nprinting/November2017/Content/Setup/HowSetUpE-mailNPrinting/Set-up-emai...

HTH - Daniel.

Support
Support

djk

Excellent Tool!

0 Likes
Creator III
Creator III

HI are you able to solve this .

Nprinting17 SMPT server set up

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2016-12-20 07:28 PM
Updated by: