Script to send emails from a TU Delft account.
Project description
TU Delft email-sender
Script to send emails from a TU Delft account.
Instructions
- In TopDesk, ask for a service/application account for the mailbox you want to send from. This can be a functional mailbox.
- Create a venv and install the package:
pip install tudelft-email-sender
- Download the .env file example .env.example:
curl -L https://gitlab.ewi.tudelft.nl/reit/email-sender/-/raw/main/.env.example -o .env
- Edit the
.envand set your SMTP credentials:FROM_ADDRESS=email@tudelft.nl SMTP_USER=_sa-email-smtpa SMTP_PASSWORD=password
- Send an email like so:
send-email \ --from myservice-account@tudelft.nl \ --recipients alice@example.com \ --recipients bob@example.com \ --subject "Test email" \ --body "Hello, this is a test email." \ --attachments ./docs/example.pdf
Notes:
- Repeat
--recipients,--cc,--bcc, and--attachmentsto pass multiple values. - Check all available CLI options:
send-email --help
Develop
- Clone the repo and install dependencies:
uv sync - Create your local environment file from the example .env.example:
cp .env.example .env
- Send an email like so:
uv run send-email \ --from myservice-account@tudelft.nl \ --recipients alice@example.com \ --recipients bob@example.com \ --subject "Test email" \ --body "Hello, this is a test email." \ --attachments ./docs/example.pdf
- A launch.json is provided for easy debugging with vscode.
License
Distributed under the terms of the GPL license.
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 tudelft_email_sender-1.0.1.tar.gz.
File metadata
- Download URL: tudelft_email_sender-1.0.1.tar.gz
- Upload date:
- Size: 46.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e30fa765e995ba4562a9ebf0947e242b8657f3f4c085147ec8cdc8765ab04234
|
|
| MD5 |
0046e8ac2920b0ae5e303fbe1204d7f9
|
|
| BLAKE2b-256 |
0c663d0996de39a530b3170deadf2e05dae5f13cd9c86cdcd4f27b39fb593453
|
File details
Details for the file tudelft_email_sender-1.0.1-py3-none-any.whl.
File metadata
- Download URL: tudelft_email_sender-1.0.1-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8cd6fe51b8127d6b792ed7fe4eb6c712ee17085fac1fbc5758fb8d9c5f6182b
|
|
| MD5 |
d4908c1336d9cb4049b412d9cfa1b36e
|
|
| BLAKE2b-256 |
2f8e7fdaa0c6cc79cd9fb2834919df94ed1f8f0fd4878e929c626396efed40bd
|