import yagmail
yag = yagmail.SMTP(from_add, password)
contents = ['See my attachment below',
    '/home/bsingh/python_files/file_dict.txt']
yag.send(contents=contents)
Attachments getting attached twice using smptplib in python