Python Send Email SMTP Example

PYTHON 2 weeks ago 906 views Intermediate
S

sujeetkumar713

21 public snippets
906 Views
0 Comments
0 Saves

Description

Python SMTP email sending example for automation scripts.
Python Send Email SMTP Example.py
import smtplib

server = smtplib.SMTP('smtp.gmail.com',587)
server.starttls()
server.login('email@gmail.com','password')

server.sendmail(
'email@gmail.com',
'target@gmail.com',
'Hello from Python'
)

server.quit()

Comments (0)

Add Comment

No comments yet. Be the first to comment!