While configuring the email server in NPrinting and using the test email functionality, sending fails with error "Email not sent. Check your email configuration"
. In the Web Engine logs the following may be registered:...
Failed to send e-mail message to email@example.com. ERROR: System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond <IP>:<SMTP tcp Port>↓↓ at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)↓↓ at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)↓↓ at System.Net.Sockets.Socket.Connect(IPAddress address, Int32 port)↓↓ at MailKit.Net.Smtp.SmtpClient.Connect(String host, Int32 port, SecureSocketOptions options, CancellationToken cancellationToken)↓↓ at Qlik.NPrinting.Repo.Service.MailService.<SendEmailAsync>d__4.MoveNext() in c:\Jws\release-18.9.x\server\NPrinting\src\Repo\Service\MailService.cs:line 63
Qlik.NPrinting.Repo 126.96.36.199 Qlik.NPrinting.Repo.Service.MailService 20180820T105530.253-07:00 ERROR NPrinting NPrinting.domain.com 0 0 0 0 0 0 0 0
Or, while publishing a successfully generated report the following may also be registered in the Scheduler logs for specific user(s):
...Qlik.NPrinting.Repo 188.8.131.52 Qlik.NPrinting.Repo.Service.MailService 20190722T161607.112-04:00 ERROR SERVERNAME Nprinting Task Identity 0 0 0 0 0 0 0 0 Failed to send e-mail message to firstname.lastname@example.org. ERROR: System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host↓↓ ...
Inner exception: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host↓↓ at System.Net.Sockets.NetworkStream.Write(Byte buffer, Int32 offset, Int32 size). Inner stack trace: at System.Net.Sockets.NetworkStream.Write(Byte buffer, Int32 offset, Int32 size).
SMTP server has disconnected / rejected relay of from NPrinting, or failed to send proper response code.
SMTP server has not been configured to accept emails from the NPrinting server or the source user utilized by NPrinting.
Also may be due to incorrect NPrinting Email setting or another reason only identifiable on the SMTP server trace logs.
In cases as the one above, since the SMTP server has provided no further information before disconnecting or halting communication the Email settings should be checked against the SMTP server requirements. If issue continues more information should be requested from the SMTP server administration in order to determine the reason for not accepting the request from NPrinting.
To confirm email can be sent from the NPrinting server see How to set up Nprinting 17 to send emails using a gmail account or server