On Tue, 11 Sep 2018 17:32:35 +0530 Avanish Upadhyay avanish005@gmail.com wrote:
# SMTP server settings to use when sending email alerts from NAV # #EMAIL_HOST = localhost #EMAIL_PORT = 25 #EMAIL_HOST_USER = #EMAIL_HOST_PASSWORD = #EMAIL_USE_TLS = False
I am also setting this configuration but no any email alert come how to test this configuration any option to send a test mail from nav server and check
Hi,
unfortunately, NAV doesn't have a feature that allows you to easily send a test e-mail.
Using the Python interpreter, you could, however, leverage parts of the NAV library to test this. One such part of the library is the UninettMailDispatcher, which is a dispatcher plugin to the SMS daemon to dispatch SMS messages to an e-mail gateway.
Run the `python` command and enter this short program:
from nav.smsd.uninettmaildispatcher import UninettMailDispatcher recipient = 'your email address here' u = UninettMailDispatcher({'mailaddr': recipient}) u.sendsms('your subject here', [(None, 'your message body', None)])
This should print out something like this when the message was delivered successfully to the SMTP server:
('your message body', [None], [], True, 0)