Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 1.2 KB

README-email.md

File metadata and controls

38 lines (31 loc) · 1.2 KB

Example to send email

If you'd like to be sent an email of the results of the queries, the mail.cfg file needs to be defined.

Some important things to note in the mail.cfg file:

  • Right now only Authenticated SMTP STARTTLS is allowed. This means you need all the fields below in order to access except the verbose field.
  • If the verbose field is defined to True, then additional SMTP interactions will be displayed.
  • the bodyHtmlFile and bodyTextFile variables define where the HTML and TEXT versions of each file is. Make sure you add the MONITOREDHOSTS keyword into the HTML and TEXT files. This is used for inserting the results into the correct place.
{
    "hostname": "mail.mysmartdomain.com",
    "port": 465,
    "smtpuser": "[email protected]",
    "smtppass": "BlaPasswordBla1",
    "startTLS": "true",
    "from": "[email protected]",
    "to": "[email protected]",
    "subject": "Certificate Checker",
    "bodyHtmlFile": "bodyhtml.html",
    "bodyTextFile": "bodytext.txt",
    "verbose": "false"
}

Single host:

$ python3 certCheck.py --hostname apple.com --sendEmail
$

Multiple hosts:

$ python3 certCheck.py --queryFile queryfile --sendEmail
$