A simple e-mail sender in Python
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simplemail_python3-1.0.0.tar.gz.
File metadata
- Download URL: simplemail_python3-1.0.0.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80ba5a745a44f5922834692c6b03617295325d88d6682dfba8b837105c21bb53
|
|
| MD5 |
301ce4ae4fb6ae4b2e3a29967f02faad
|
|
| BLAKE2b-256 |
9756b9c09d969440d5d32033a3500f1b1135badf3525a0dbcedd61ca3578bbf5
|
Provenance
The following attestation bundles were made for simplemail_python3-1.0.0.tar.gz:
Publisher:
publish.yml on JAVGan/simplemail
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simplemail_python3-1.0.0.tar.gz -
Subject digest:
80ba5a745a44f5922834692c6b03617295325d88d6682dfba8b837105c21bb53 - Sigstore transparency entry: 2170058823
- Sigstore integration time:
-
Permalink:
JAVGan/simplemail@694cd994a8ff3f861f9b483b0d32b44d2b748e05 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/JAVGan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@694cd994a8ff3f861f9b483b0d32b44d2b748e05 -
Trigger Event:
release
-
Statement type:
File details
Details for the file simplemail_python3-1.0.0-py3-none-any.whl.
File metadata
- Download URL: simplemail_python3-1.0.0-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71781913fdb614f9108d8173bf16421eb9eb3b4305a2d7f344b2e97be12d6b8c
|
|
| MD5 |
86ce9fbc7ca613073f9e5df7e278e1c5
|
|
| BLAKE2b-256 |
c0204e4ed2bdf018a66520404afc08aa5564ef0d6017cfbc86a063beb4732e24
|
Provenance
The following attestation bundles were made for simplemail_python3-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on JAVGan/simplemail
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simplemail_python3-1.0.0-py3-none-any.whl -
Subject digest:
71781913fdb614f9108d8173bf16421eb9eb3b4305a2d7f344b2e97be12d6b8c - Sigstore transparency entry: 2170058835
- Sigstore integration time:
-
Permalink:
JAVGan/simplemail@694cd994a8ff3f861f9b483b0d32b44d2b748e05 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/JAVGan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@694cd994a8ff3f861f9b483b0d32b44d2b748e05 -
Trigger Event:
release
-
Statement type: