Comments (2)
I agree that reliable email delivery would be best implemented by starting with rendering all the templates into a folder.
In summary, I think that writing output to a folder is a niche use with a reasonable work-around. I don't think it makes sense as a stand-alone feature. I do think it makes sense as part of the bigger picture of reliable delivery #36. I'm goingg to close this issue in favor of continuing the discussion under issue #36.
Could you sketch out your thoughts on this please? I was planning on simply feeding all the generated eml files to a script that works with an individual message and either gets it accepted by the SMTP server or returns a non-zero error when giving up:
ls /path/to/*.eml | xargs -I{} bash -c "send.sh {} && mv {} {}.sent"
This would alert me when any of the messages failed to send, and would fix itself later in case of an intermittent error. A bad eml would require a manual intervention (removing it from the queue and possibly generating a fixed version).
from mailmerge.
I'm thinking something like this
- Create a directory
RUNDIR
- Render all messages to individual plain text files in
RUNDIR
- Send messages one at a time
a. If success, move on the next message
b. If failure, wait and then try again
Design decisions
- Should we delete messages that have been sent successfully?
- Where should
RUNDIR
be located? - Which specific SMTP exceptions should trigger a retry?
- How long to wait between attempts?
- Where to configure the delay between attempts and max retries?
- What happens if mailmerge exits unsuccessfully for any reason? E.g., user hits Control-C, an exception occurs, an error in a database row. Delete
RUNDIR
and start over next time mailmerge is run? Start where you left off? - What happens if template or database changes in the middle of a retry? Should we copy the template, database, config, and attachments into
RUNDIR
?
Testing
- Verify
mailmerge --dry-run
does not write any files - Directory creation, even with different PWD
- Message render to files
- Max retry
- Delay between attempts
- Directory cleanup(?) on success
- Directory cleanup on error
- Resume behavior on second run after error (pending design decision)
from mailmerge.
Related Issues (20)
- Recipe for machine-readable messages
- FEATURE MISSING: personal attachments HOT 2
- Block list HOT 1
- Apple Mail with attachments issue (former title: UTF-8 support issue) HOT 11
- Move test dependecies to extras_require
- Debug flag
- mails limit per mail feature HOT 5
- Interactive mode
- Drop Python 2 Support HOT 5
- Change CI to GitHub Actions
- setup.py has "html5" but It has a new name "html5lib"
- Inline images not working in thunderbird? HOT 5
- Crashes on email adresses with illegal characters HOT 2
- Replace `setup.py` with `pyproject.toml`
- Support CSV files with semicolons as separators HOT 3
- Add support for 2FA OAuth authentication HOT 2
- New release on Pipy HOT 1
- No mailmerge_server.conf file in the repository HOT 2
- Load system default SSL cert
- Space at the end of the header row
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mailmerge.