Metadata-Version: 2.4
Name: flexible_batch_email_sender
Version: 0.1.1
Summary: A flexible batch email sender for a variety of scripting tasks.
Author-email: Žan Šadl Ferš <zan.sf@disroot.org>
Maintainer-email: Žan Šadl Ferš <zan.sf@disroot.org>
License-Expression: MIT
Keywords: automated,csv,excel,scipting,automation,email,email client,batched
Classifier: Development Status :: 4 - Beta
Classifier: Topic :: Utilities
Classifier: Topic :: Communications :: Email :: Email Clients (MUA)
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows :: Windows 8
Classifier: Operating System :: Microsoft :: Windows :: Windows 8.1
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
Classifier: Operating System :: Microsoft :: Windows :: Windows 11
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: ConfigArgParse>=1.7.5
Requires-Dist: tqdm>=4.70.0
Requires-Dist: openpyxl>=3.1.5
Requires-Dist: mako>=1.3.12
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: pyinstaller; extra == "dev"
Dynamic: license-file

Flexible Batch Email Sender
===========================

A email client tool for sending batches of emails over SMTP as part of a automation script or pipeline.

The email body can be regular text files or Mako templates that get rendered before being send off,
allowing for dynamic content.

How to use
----------

The intended way of running this program is **within shell scripts or CI/CD pipelines**,
with different configurations for different purposes.

The CLI arguments can be pre-provided by having a configuration file,
that presets the CLI parameters values when the program runs.
This allows different configurations for different needs to be prepared in a standardized and cross-platform way.

The following is required for use:

* Email account data, from which to send the email batched. Either provided directly over the CLI arguments or
  from a `netrc` file. Set the **appropriate permissions (if ran from a script or using the netrc file)**,
  due to them **containing sensitive information**!
* A data source (`.csv`, `.xlsx` or `.xlsm`), from which the parameters are obtained for filling out the templates.

The program processed *each row of the data source as a potential email to send*.
If *a row is matched*, its data is obtained and processed into template parameters.
One message template is used as the basis for the batch email sending.
If *no templates are used*, then this can be ignored.

Windows specific caveats
------------------------

Due to `argparse` and consequently `ConfigArgParse` using the method `locale.getpreferredencoding` for determining the config file encoding,
it needs to be in the same encoding or transcoded to it.

Another solution (or workaround, to each their own) is to enable [Python UTF-8 mode](https://peps.python.org/pep-0540/) by seting the environment variable `PYTHONUTF8` with the value `1` before running this program, forcing Python v3 to read the config file as a UTF-8 encoded textfile. However, from what i saw, [Python v3.15 and future versions will have it enabled by default](https://pydevtools.com/blog/python-315-utf8-default/). If using the `pyinstaller` produced binaries, it is *enabled by default*.
