the API used form : https://apisetu.gov.in/
pip install requests #to send api request
email,smtplib libraries to send mail.
if you get error like smtplib.SMTPAuthenticationError:
read this: https://support.google.com/accounts/answer/6010255
In a nutshell, google is not allowing to log in via smtplib because it has flagged this sort of login as "less secure", so go to this link while you're logged in to your google account, and allow the access: