pyats icon indicating copy to clipboard operation
pyats copied to clipboard

EMAIL notification on pyATS

Open luisantoniovillalobos opened this issue 9 months ago • 0 comments

Hello Community: I have a question regarding EMAIL notification on pyATS. I have already configured my own SMTP host, I defined the next:

`# Example

-------

pyATS configuration file

[email] smtp.host = outbound.cisco.com default_domain = cisco.com smtp.ssl = True

[interaction]

Address to bind server to

server.host = outbound.cisco.com email.disable = False

May require authentication for SMTP

email.from = [email protected] email.to = [email protected],[email protected]

This is formatted by jinja2. section_name is one argument that will be

populated in a template format.

email.subject = Reporte `

Checking the logs when I run my job file, I am seeing the next:

`pyats run job HC_ASR.py --customer_param HC_param.yml --nodes Claro_Argentina_Cordoba.yaml --hc_type staros_basic_healthcheck.py --html-logs -vvv

2024-05-04T19:40:11: %EASYPY-INFO: -- disconnect_from_devices PASSED 2024-05-04T19:40:11: %EASYPY-INFO: Sending report email... 2024-05-04T19:40:11: %UTILS-DEBUG: Sending messaging to outbound.cisco.com:None 2024-05-04T19:40:13: %UTILS-DEBUG: ---------- Email Content ---------- 2024-05-04T19:40:13: %UTILS-DEBUG: 2024-05-04T19:40:13: %UTILS-DEBUG: From: [email protected] 2024-05-04T19:40:13: %UTILS-DEBUG: To: [email protected] 2024-05-04T19:40:13: %UTILS-DEBUG: Subject: pyATS Report - job: Claro Argentina by: root, total: 9 (P:1, PX:0, F:0 ...) 2024-05-04T19:40:13: %UTILS-DEBUG: Content-Type: text/plain; charset="utf-8" 2024-05-04T19:40:13: %UTILS-DEBUG: Content-Transfer-Encoding: 7bit 2024-05-04T19:40:13: %UTILS-DEBUG: MIME-Version: 1.0

Do you know, why pyATS is not taking the configuration defined below "interaction" section regarding email.from and email.to?

luisantoniovillalobos avatar May 10 '24 15:05 luisantoniovillalobos