Hi dev,
You likely found this article since you need to send emails utilizing Python. Maybe you need to get mail updates from your code, send a affirmation e-mail to clients when they make an account, or send emails to individuals of your organization to remind them to pay their dues. Sending emails physically may be a time-consuming and error-prone assignment, but it’s simple to mechanize with Python.
Getting Begun
In this example you have to install smtplib
package, after installation create code like below example.
import smtplib
my_email"test@gmail.com" password= "test123"
connection = smtplib.SMTP ("smtp.gmail.com", 587)
connection.starttls()
connection.login(user my_email, password = password)
connection.sendmail(from_addr my_email,
to_addrs="receipentemail@gmail.com", msg = "Hello World")
connection.close()
Hope it can help you…
Categories : Python
Tags : SMTP