Skip to main content

Script to sending emails from a TU Delft account.

Project description

TU Delft email-sender

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.0.tar.gz (46.6 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.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file tudelft_email_sender-1.0.0.tar.gz.

File metadata

  • Download URL: tudelft_email_sender-1.0.0.tar.gz
  • Upload date:
  • Size: 46.6 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.0.tar.gz
Algorithm Hash digest
SHA256 dae8f9bda480e508ca57b1d54d4825d67a248f152061af2727e56077b1a9099f
MD5 ec4bd527fe6797734b8656d3f17dd0ff
BLAKE2b-256 661da702a26499c44e1e821e99058fe5a1c08484fb7ee5130693cb93e9ee60d8

See more details on using hashes here.

File details

Details for the file tudelft_email_sender-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: tudelft_email_sender-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ef93c3d5a72800276ef0536674b6155e0f721abbe59fea9af8bcec36b1bdc0b
MD5 cb5341a8b22710ed5475a6dc29b088cb
BLAKE2b-256 c65fc0ab09df7415dfa3965424b41a20b54164ff7c7351dd057009d109ee834f

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