Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mail issue
#3
You can use smtplib.SMTP_SSL method.

smtp_host="smtp.gmail.com"
smtp_ssl_port=465

email = '[email protected]'
password = '********'
send_to_mail = '[email protected]'
message = 'online'

server = smtplib.SMTP_SSL(smtp_host, smtp_ssl_port)
server.ehlo()
server.login(email, password)
server.sendmail(email, send_to_mail, msg)
server.close()
reference: Python freezes on smtplib.SMTP(“smtp.gmail.com”, 587)
Reply


Messages In This Thread
Mail issue - by Mihil - Dec-03-2020, 03:35 AM
RE: Mail issue - by bowlofred - Dec-03-2020, 03:42 AM
RE: Mail issue - by Superjoe - Dec-03-2020, 04:44 AM
RE: Mail issue - by Mihil - Dec-03-2020, 05:25 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  o365 special subject mail download issue anna 3 2,975 May-16-2019, 07:16 PM
Last Post: micseydel
  smtplib mail without subject anna 2 2,542 Apr-24-2019, 05:44 AM
Last Post: anna
  Mail Faiyaz 1 28,795 Sep-24-2018, 02:29 PM
Last Post: Larz60+
  Outlook mail watcher g_shanmuga 1 5,113 Mar-26-2018, 04:09 PM
Last Post: nilamo
  Simple e-mail sender, that automatically changes subject for every e-mail joker 2 3,220 Aug-24-2017, 09:45 AM
Last Post: joker
  Mail is not sent to multiple users ur00361883 1 3,247 Apr-25-2017, 07:00 AM
Last Post: ur00361883

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020