How to send a mail with a mailserver setup like this?

hasAuthorization: Y
username: mail@domainname.com
password: mail@password
senderEmail: sender@domainname.com
properties:
  mail.smtp.auth: true
  mail.smtp.host: mail.domainname.com
  mail.smtp.starttls.enable: true
  #mail.smtp.ssl.enable: true
  mail.smtp.ssl.protocols: TLSv1.1
  mail.smtp.port: 587
  mail.debug: true

Any idea? In bash, python-2(that's what is installed)...Anything is fine. I need to send alerts, wondering how to make this work first.

Hi @Ihattaren,

don't use python2, it's deprecacted since Jan 2020 and out of support. Use python3 instead. And you could take a look at Sending Emails With Python – Real Python.

1 Like