Giter VIP home page Giter VIP logo

Comments (5)

awdeorio avatar awdeorio commented on August 19, 2024 5

Thanks for the input, @AeonJJohnson , this is a great idea. Perhaps the default should be to continue on an error due to a bad email address. Then we could add a flag like --stop-on-error.

I'm not sure what exact exception is thrown in the situations you're describing. Would you be able to add a detailed list to this issue? I think that mailmerge should fail on catastrophic errors like a bad SMTP password, while it should log and continue on errors like "SMTP server doesn't like email address X".

from mailmerge.

philpagel avatar philpagel commented on August 19, 2024

I would find it most useful if mailmerge didn't just log the failed attempts but (optionally) created an output file that contains the rows of the original input csv file which failed. Possibly adding an extra column that contains the error message.
That way I could easily check the failed email addresses, correct them and run mailmerge again on the edited file. Alternatively, it could output the full input database with the error message column added and I would filter that myself before processing the failed items.
Maybe this behavior could be triggered by a flag --dump-failed or something similar. The filename would be something like mailmerge_fails.csv by default and could be changed via --faildb.

from mailmerge.

awdeorio avatar awdeorio commented on August 19, 2024

WDYT about including a unique log message in #9 so that you could grep the most recent log for failed messages?

from mailmerge.

philpagel avatar philpagel commented on August 19, 2024

So the workflow would be

  1. grep "sending failed" mailmerge.log > failed.txt
  2. Open the database in a spreadsheet or editor
  3. less failed.txt
  4. Go through database by fail-log; edit as appropriate and introduce an indicator column so I can filter the re-send worthy rows
  5. Save the parts of the database that I want to send after my edit
  6. run mailmerge on that.

I guess it would work but to my personal taste (i.e. lazy) it feels more convenient to directly dive into the output file and start checking/correcting my bad email addresses without having to navigate to them one by one based on the grep output or putting together some shell magic to re-run mailmerge on just those lines, again. That's why I like the idea of an indicator column I can quickly filter by for editing and export.

Of course, if you feel that shouldn't be handled inside mailmerge itself, that could be done by an external helper script, too...

from mailmerge.

awdeorio avatar awdeorio commented on August 19, 2024

You make a good point that this could get complicated. Now that I think about it, your suggestion of writing a CSV with failed rows makes sense. Perhaps this should simply be the default behavior. A user could always simply ignore the fail log.

from mailmerge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.