Ver Fonte

use keyring for smslink credentials

deeejas há 1 ano atrás
pai
commit
175924de48
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      mentor_mailer.py

+ 3 - 1
mentor_mailer.py

@@ -1,6 +1,7 @@
 '''Created Jan 30, 2023 deeejas'''
 # coding: UTF-8
 import yagmail
+import keyring
 
 from winmentor import WinMentor
 from winmentor import M_mailer
@@ -51,7 +52,8 @@ yag = yagmail.SMTP('claudia.conta.ab@gmail.com', oauth2_file='~/oauth2_creds.jso
 month_ = M_mailer.mentor_date
 mailer = M_mailer()
 taxes = mailer.tax_mailer(office, m_list, mentor, yag, month_, send=False)
-sms = Smslink('A297457A64817C11', 'U7BYbyXCot2I5hvR')
+sms = Smslink(connectionid=keyring.get_password('smslink', 'Connection ID'),
+              password=keyring.get_password('smslink', 'parola'))
 # resp = sms.send()
 # print(resp.text)
 for company, contact in m_list.items():