Guanyu-Lin commited on
Commit
3ae5f2d
1 Parent(s): c8c8672
Files changed (1) hide show
  1. mail_simple.py +1 -1
mail_simple.py CHANGED
@@ -17,7 +17,7 @@ def send_email(sender_email, app_password, recipient_email, subject, body):
17
  msg['Subject'] = subject
18
  msg['To'] = recipient_email
19
  msg.attach(MIMEText(body, 'html'))
20
- server = smtplib.SMTP('smtp.gmail.com', 8889)
21
  try:
22
  # Set up the SMTP server
23
 
 
17
  msg['Subject'] = subject
18
  msg['To'] = recipient_email
19
  msg.attach(MIMEText(body, 'html'))
20
+ server = smtplib.SMTP_SSL('smtp.gmail.com', 8889)
21
  try:
22
  # Set up the SMTP server
23