Skip to content

pklaus/sendmail_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Example Script to Send E-Mails with Python3

CLI Signature

$ ./sendmail.py --help
usage: sendmail.py [-h] --subject SUBJECT --from FROM --to TO --configfile
                   CONFIGFILE [--configsection CONFIGSECTION]
                   MAILBODY [ATTACHMENT [ATTACHMENT ...]]

Send an email. With Python.

positional arguments:
  MAILBODY              A text file containing the mail body itself
  ATTACHMENT            Optional files to attach

optional arguments:
  -h, --help            show this help message and exit
  --subject SUBJECT
  --from FROM
  --to TO
  --configfile CONFIGFILE
                        The .ini file with the mailserver credentials
  --configsection CONFIGSECTION
                        The mail server section to choose in the configfile.

Resources

About

Send E-Mails with Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages