Skip to main content

Script to send emails from a TU Delft account.

Project description

TU Delft email-sender

PyPI

Script to send emails from a TU Delft account.

Instructions

  1. In TopDesk, ask for a service/application account for the mailbox you want to send from. This can be a functional mailbox.
  2. Create a venv and install the package:
    pip install tudelft-email-sender
    
  3. Download the .env file example .env.example:
    curl -L https://gitlab.ewi.tudelft.nl/reit/email-sender/-/raw/main/.env.example -o .env
    
  4. Edit the .env and set your SMTP credentials:
    FROM_ADDRESS=email@tudelft.nl
    SMTP_USER=_sa-email-smtpa
    SMTP_PASSWORD=password
    
  5. 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 --attachments to pass multiple values.
  • Check all available CLI options:
    send-email --help
    

Develop

  1. Clone the repo and install dependencies:
    uv sync
    
  2. Create your local environment file from the example .env.example:
    cp .env.example .env
    
  3. 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
    
  4. A launch.json is provided for easy debugging with vscode.

License

Distributed under the terms of the GPL license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tudelft_email_sender-1.0.1.tar.gz (46.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tudelft_email_sender-1.0.1-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

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

Hashes for tudelft_email_sender-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e30fa765e995ba4562a9ebf0947e242b8657f3f4c085147ec8cdc8765ab04234
MD5 0046e8ac2920b0ae5e303fbe1204d7f9
BLAKE2b-256 0c663d0996de39a530b3170deadf2e05dae5f13cd9c86cdcd4f27b39fb593453

See more details on using hashes here.

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

Hashes for tudelft_email_sender-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d8cd6fe51b8127d6b792ed7fe4eb6c712ee17085fac1fbc5758fb8d9c5f6182b
MD5 d4908c1336d9cb4049b412d9cfa1b36e
BLAKE2b-256 2f8e7fdaa0c6cc79cd9fb2834919df94ed1f8f0fd4878e929c626396efed40bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page