Spaces:
Running
Running
Guanyu-Lin
commited on
Commit
•
c8c8672
1
Parent(s):
aef5622
- mail_simple.py +3 -3
mail_simple.py
CHANGED
@@ -17,10 +17,10 @@ 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 |
-
|
21 |
try:
|
22 |
# Set up the SMTP server
|
23 |
-
|
24 |
server.starttls() # Secure the connection
|
25 |
server.login(sender_email, app_password) # Log in to your Gmail account
|
26 |
|
@@ -38,7 +38,7 @@ def send_email(sender_email, app_password, recipient_email, subject, body):
|
|
38 |
|
39 |
def sign_up_email(email, profile):
|
40 |
sender_email = "[email protected]"
|
41 |
-
app_password =
|
42 |
recipient_email = email
|
43 |
# for recipient_email in email_pool.keys():
|
44 |
email_input = {}
|
|
|
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 |
+
|
24 |
server.starttls() # Secure the connection
|
25 |
server.login(sender_email, app_password) # Log in to your Gmail account
|
26 |
|
|
|
38 |
|
39 |
def sign_up_email(email, profile):
|
40 |
sender_email = "[email protected]"
|
41 |
+
app_password = APP_PASSWORD
|
42 |
recipient_email = email
|
43 |
# for recipient_email in email_pool.keys():
|
44 |
email_input = {}
|