<gh_stars>0
# Sending emails without attachments using Python.
# importing the required library.
import smtplib

# creates SMTP session
email = smtplib.SMTP('smtp.gmail.com', 587)

# TLS for security
email.starttls()

# authentication
# compiler gives an error for wrong credential.
email.login("<EMAIL>", "P@77492P")
# email.login("<EMAIL>", "Smtp@12345")

# message to be sent
message = "message_to_be_send"

# sending the mail
email.sendmail("<EMAIL>", "<EMAIL>", message)

# terminating the session
email.quit()
# Sending emails without attachments using Python.
# importing the required library.
import smtplib

# creates SMTP session
email = smtplib.SMTP('smtp.gmail.com', 587)

# TLS for security
email.starttls()

# authentication
# compiler gives an error for wrong credential.
email.login("<EMAIL>", "P@77492P")
# email.login("<EMAIL>", "Smtp@12345")

# message to be sent
message = "message_to_be_send"

# sending the mail
email.sendmail("<EMAIL>", "<EMAIL>", message)

# terminating the session
email.quit()
# Sending emails without attachments using Python. # importing the required library. # creates SMTP session # TLS for security # authentication # compiler gives an error for wrong credential. # email.login("<EMAIL>", "Smtp@12345") # message to be sent # sending the mail # terminating the session