|
5 | 5 | from email.mime.text import MIMEText |
6 | 6 | from email.mime.base import MIMEBase |
7 | 7 | from email.mime.multipart import MIMEMultipart |
8 | | -from env import FROM_EMAIL, SMTP_HOST, SMTP_USER, SMTP_PASS, BCC_EMAIL_S, HOSTER_EMAIL, HOSTER_INTERESTED_ROLLS, HOSTER_NAME, ROLL_MAIL, ROLL_NAME |
| 8 | +from env import FROM_EMAIL, SMTP_HOST, FROM_EMAIL_USER, FROM_EMAIL_PASS, BCC_EMAIL_S, HOSTER_EMAIL, HOSTER_INTERESTED_ROLLS, HOSTER_NAME, ROLL_MAIL, ROLL_NAME |
9 | 9 |
|
10 | 10 |
|
11 | 11 | def send_shortlists(mails, gmail_api, smtp): |
@@ -41,7 +41,7 @@ def send_shortlists(mails, gmail_api, smtp): |
41 | 41 | with smtplib.SMTP_SSL(SMTP_HOST, 465, context=context) as server: |
42 | 42 | logging.info(" [Connected!]") |
43 | 43 | try: |
44 | | - server.login(SMTP_USER, SMTP_PASS) |
| 44 | + server.login(FROM_EMAIL_USER, FROM_EMAIL_PASS) |
45 | 45 | logging.info(" [Logged In!]") |
46 | 46 | except Exception as e: |
47 | 47 | logging.error(f" Failed to log in ~ {str(e)}") |
@@ -176,7 +176,7 @@ def send_companies(mail, gmail_api, smtp): |
176 | 176 | with smtplib.SMTP_SSL(SMTP_HOST, 465, context=context) as server: |
177 | 177 | logging.info(" [Connected!]") |
178 | 178 | try: |
179 | | - server.login(SMTP_USER, SMTP_PASS) |
| 179 | + server.login(FROM_EMAIL_USER, FROM_EMAIL_PASS) |
180 | 180 | logging.info(" [Logged In!]") |
181 | 181 | except Exception as e: |
182 | 182 | logging.error(f" Failed to log in ~ {str(e)}") |
@@ -290,7 +290,7 @@ def send_notices(mails, smtp, gmail_api, notice_db): |
290 | 290 | with smtplib.SMTP_SSL(SMTP_HOST, 465, context=context) as server: |
291 | 291 | logging.info(" [Connected!]") |
292 | 292 | try: |
293 | | - server.login(SMTP_USER, SMTP_PASS) |
| 293 | + server.login(FROM_EMAIL_USER, FROM_EMAIL_PASS) |
294 | 294 | logging.info(" [Logged In!]") |
295 | 295 | except Exception as e: |
296 | 296 | logging.error(f" Failed to log in ~ {str(e)}") |
|
0 commit comments