I want to know how i can attach a pdf to my mail. Sending a mail is not a problem - just the attachement is. So you probably have seen that error before and im already sorry for asking again BUT i literally cant find any solution for this - that works for me. I tried everything i could find for example:
Python shortcut with the filename at the end
Give the script and the folder admin Privileges
Starting my CMD as admin as well
I think that are the most common solutions to the problem but they are not working for me. The following is the code i use. At the open() the problem appears but i think the people that can help me here know how the rest looks anyway. Its pretty basic, i used nothing fancy. Btw downloading an attachement was easy aswell, just sending it is ...
path = "C:/****/.../****"
attachment = open(path, "rb")
Hope you all have a great day!