Original code copyright (C) 2009-2022 Rudolf Cardinal (

This file is part of cardinal_pythonlib.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Command-line entry point for the simple bulk e-mail tool.

class cardinal_pythonlib.bulk_email.main.Command[source]

Commands to this tool.

cardinal_pythonlib.bulk_email.main.add_job(session: Session, recipients_filename: str, from_addr: str, reply_to_addr: str, subject: str, content_html_filename: str | None, content_text_filename: str | None, charset: str, timestamp_at_creation: bool) None[source]

Adds an e-mail sending job – contents and recipients.

cardinal_pythonlib.bulk_email.main.clear_pending_jobs(session: Session) None[source]

Shows information about jobs, to stdout.

cardinal_pythonlib.bulk_email.main.configure(session: Session, host: str, port: int, use_tls: bool, username: str, password: str, time_between_emails: float) None[source]

Updates the configuration from command-line parameters.

cardinal_pythonlib.bulk_email.main.create_db(engine: Engine) None[source]

Creates the database. Session) None[source]

Shows information about jobs, to stdout.

cardinal_pythonlib.bulk_email.main.main() None[source]

Command-line entry point. Session, stop_on_error: bool) None[source]

Processes outstanding jobs until there are no more.