I'm trying to open a email-client (eg thunderbird) to send an email with an attachment. I have tried to open the client with webbrowser.open('mailto:[...]?attachment="path_to_file"')
, but there was no attachment. I also tried to write file://path_to_file
.
I have searched in the web for a solution, but there I only found tutorials how to send emails with SMTP. Do you have an idea?
Python open email client with attachment
Asked Answered
I would use this python recipe for a portable and sound way to send mails with attachments in python.
You can achieve the same result by calling thunderbird via system commands.
Here is a thread that I started. I got a good reply:
Python: Open Thunderbird to write new mail with attached file
© 2022 - 2024 — McMap. All rights reserved.
python t.py -m [email protected] --attach="file://home/aha/top.png"
a client (thunderbird) is opening but without a file as attachment. mailto_string in line 286 is:mailto:[email protected]?attach=file%3A%2F%2Fhome%2Faha%2Ftop.png
what am I doing wrong? – Microfilm