These code will work if and only if, You need to make sure that the Allow less secure apps is ON. This can be achieved by going into your email settings an then goto sign&security.
-
Download the code here
-
Make sure that you have pre-installed Python3.6X version.
-
Then click the file Email_id_password.py, Then enter your email address and password.
-
Then run the file mail.py.
-
Enter the details like :
- To address
- Subject
- Body
- No.Of Files to be Attached
- Finally, enter the files names
-
Make sure that the ataching files should be in the same directory where the files have been saved.
- Your mail will sent with in minutes.