Note: Necessary setting to be done before python code execution. Open file /etc/ssmt /ssmtp.conf and done settings as shown.

email1