Email merge from CLI
I want to do email merge (i.e. send emails by taking input from a spreadsheet) from a python program.
I have looked into python's email module, but that requires storing password etc in the code which is not feasible.
My plan was that i could call an thunderbird's mail merge plugins from my python program. This way, there would be no problem for credentials.
The email merge plugin used is this: Mail Merge 9.6.1 (by Alexander Bergmann) https://addons.thunderbird.net/addon/mail-merge/
i _think_ it would require knowing the CLI command. On looking for "thunderbird CLI" online, I found this article: Command line arguments - Thunderbird which showed following sample command to launch a new thunderbird compose window
`thunderbird -compose "to='[email protected],[email protected]',cc='[email protected]',subject='dinner',body='How about dinner tonight?',attachment='C:\temp\info.doc,C:\temp\food.doc'"`
This is good for composing single mails! But how to specify the arguments for the mail merge?
Being dependent on the add-on, i know that this is not a thunderbird's issue per se, but i couldn't find any other way to find about it.
Thanks.
Alle antwurden (4)
All I can suggest is to create a csv file from the spreadsheet, as that works.
david said
All I can suggest is to create a csv file from the spreadsheet, as that works.
Hi! umh, can u please explain a bit more? the above one is way too vague.
- Like where to use that csv file, In thunderbird or in mail merge addon?
- what do you mean by "that works" - where does it work? In thunderbird or in mail merge addon?
- how does it work - for email merge or just for entering recepients? if former, then does thunderbird have email merge within itself without requiring add-on?
and above all, how to do use that csv file via CLI?
Your post mentioned the mailmerge addon and it supports csv. Instructions are on the addon pane for mailmerge.
thanks a lot for being sooo much lot wonderfully understandably telekinetically helpful without even reading my question. thanks a lot for putting so much of your efforts.
i am so much obliged to have received such great help.