Hi@akhtar,
To set smtp server in your system, you have to install smtplib module.
$ pip install smtplib
After that you can use this below code for checking.
import smtplib,getpass
sender='xxxxxxx'
receiver=['xxxxxxx','xxxxxxx']
password=getpass.getpass('Enter your password')
smtpserver=smtplib.SMTP("smtp.gmail.com",587)
smtpserver.ehlo()
smtpserver.starttls()
smtpserver.ehlo
smtpserver.login(sender,password)
msg='Subject:Demo\nThis is a demo'
smtpserver.sendmail(sender,receiver,msg)
print('Sent')
smtpserver.close()
Hope this will work.