Open Python email client with attachment
I am trying to open an email client (like thunderbird) to send an email with an attachment. I 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 the internet for a solution, but there I only found tutorials on how to send emails using SMTP. Do you have an idea?
I would use this python recipe for a portable and audible way of sending emails with attachments in python.
You can achieve the same result by invoking thunderbird using system commands.
Here is the thread I started. I got a good answer:
Python: open Thunderbird to write new mail with file attached