Skip to main content

simplemail

A simple e-mail sender in Python

Getting Started

This project provides a simple and portable python script which can be used to send e-mails by SMTP.

It will use the parameters received as arguments to process the mail request.

Prerequisites

Python 3 installation with smtplib

Installing

Just copy the file simpleMail.py to your preferred working directory and call it with their Python 3 interpreter

cp src/simpleMail.py YOUR_DIRECTORY

Execution

In order to execute the simplemail use:

python simpleMail.py [ARGS]

Where the minimal arguments are:

-f [MAIL_ADDRESS]     # The sender email address
                    
-t [MAIL_ADDRESSESS]  # The recipient email address(es)

It's possible to store the default values for SMTP, MESSAGE and LOGGING in a config.ini file to avoid passing them in command line everytime. Check the internal docs on configuration_example.ini to know how to configure it

python simpleMail.py -f "from@example.com" -t "to@exmple.com" -c "templates/configuration_example.ini"

Optional arguments:

-c [CONFIG_FILE]      # The configuration file in INI format

-m [MESSAGE ...]      # The message content (body). It can be a file with the content or a string with the raw text

-xu [USERNAME]        # The username for SMTP authentication

-xp [PASSWORD]        # The password for SMTP authentication

-cc [MAIL_ADDRESS ...]   # The cc email address(es)

-bcc [MAIL_ADDRESS ...]  # The bcc email address(es)

-u [SUBJECT]             # The message subject. Default = "(no subject)"

-s SERVER[:PORT],        # The smtp server in the format "host:port". Default = localhost:25

-a [FILE ...]            # File attachment(s)

--tls <true|false|auto>  # Whether use TLS or not. Default = auto

--ssl <true|false|auto>  # Whether use SSL or not. Default = auto

--content-type [TYPE]    # The message body type. Default = "text/html"

--charset [CHARSET]      # The message body character encoding. Default = "utf-8"

--log-level [DEBUG|INFO|WARNING|ERROR|CRITICAL]   # The log level. Defatult = INFO

--log-file [FILE]        # log into a file instead of using STDOUT.

--smtp-debug <true|false> # whether to enable debugging for SMTP communication. Default = false

The complete list of arguments can be found by executing:

python simpleMail.py --help

Authors

  • Jonathan Gangi - Initial work - JAVGan

License

This project is licensed under the GNU LESSER GENERAL PUBLIC LICENSE v2.1 - see the LICENSE file for details

Metadata

Release files for simplemail-python3 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simplemail-python3 1.0.0
File Size Uploaded Provenance Actions
simplemail_python3-1.0.0.tar.gz 18.7 kB With provenance Details for simplemail_python3-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for simplemail-python3 1.0.0
File Interpreter ABI Platform Actions
simplemail_python3-1.0.0-py3-none-any.whl Python 3 none any Details for simplemail_python3-1.0.0-py3-none-any.whl

Total release size: 35.8 kB

Release files / simplemail_python3-1.0.0.tar.gz

Download URL simplemail_python3-1.0.0.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
80ba5a745a44f5922834692c6b03617295325d88d6682dfba8b837105c21bb53
BLAKE2b-256 checksum
How to use checksums
9756b9c09d969440d5d32033a3500f1b1135badf3525a0dbcedd61ca3578bbf5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

Release files / simplemail_python3-1.0.0-py3-none-any.whl

Download URL simplemail_python3-1.0.0-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71781913fdb614f9108d8173bf16421eb9eb3b4305a2d7f344b2e97be12d6b8c
BLAKE2b-256 checksum
How to use checksums
c0204e4ed2bdf018a66520404afc08aa5564ef0d6017cfbc86a063beb4732e24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

Security for simplemail-python3 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for simplemail_python3-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page