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?
+3
source to share
2 answers
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
0
source to share