Python - Send email with attachments

This is the code snippet to send an email with attachments using python smtp module: