1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- '''Created Jan 30, 2023 deeejas'''
- # coding: UTF-8
- import yagmail
- import keyring
- from winmentor import WinMentor
- from winmentor import M_mailer
- from winmentor import Smslink
- m_list = {'CHRYSOPEEA BRANDING & DESIGN SRL': {'mail': 'deeejas@mail.com', 'phone': '0754694364'}
- # 'Drytec': ['zsofia.torok4@gmail.com', 'vtorok@gmail.com'],
- # 'Ergo': 'office@ergohr.eu',
- # 'German': ['info@germanstone.ro', 'flori.flamand@germanstone.ro', 'freemir@web.de'],
- # 'Kun': 'kun_g_tibor@yahoo.com',
- # 'Mathe': 'tudor.aciu@gmail.com',
- # 'Chrysopeea': ['cristina.stan@chrysopeea.com', 'sfeliciacristina@yahoo.com'],
- # 'Elegance': 'bolbagelu@yahoo.com',
- # 'KK Invest': ['office@kkinv.ro', 'katalin.betegh@kkinv.ro'],
- # 'Vibro': ['tamas_neda@yahoo.com', 'romania@vibrocomp.com'],
- # 'Webs': 'webs_srl@yahoo.com',
- # 'Taurus': 'cotinghiu_dan@yahoo.com'
- }
- exclude = ['ABRON',
- 'ASCOMVEL',
- 'ASDONAT',
- 'ASPRO',
- 'ASIONAG',
- 'ASIVP',
- 'ALPHA',
- 'ASOBS',
- 'BANXI',
- 'BREIS',
- 'COMELECT',
- 'ECOPROT',
- 'EVEREST',
- 'FLAUR',
- 'GBZPFA',
- 'JOART',
- 'LUXWIN',
- 'MATILAND',
- 'MOCAN',
- 'SCOM',
- 'TERHOV',
- 'UNION',
- 'RECYC']
- head = ['Denumire', 'CF', 'J', 'Adresa', 'Oras', 'Judet', 'Prescurtat', 'Admin', 'AdminP', 'RCNP', 'Obs']
- mentor = WinMentor()
- office = list(mentor.filtered_firmlist(headers=head, ban=exclude)) # generator
- yag = yagmail.SMTP('claudia.conta.ab@gmail.com') #, oauth2_file='~/oauth2_creds.json'
- month_ = M_mailer.mentor_date
- mailer = M_mailer()
- taxes = mailer.tax_mailer(office, m_list, mentor, yag, month_, send=False)
- 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():
- for tax in taxes:
- # print(repr(tax))
- if company == tax.name:
- # print(repr(tax))
- sms.message = repr(tax)
- sms.to = contact['phone']
- print(sms.to, '\n', sms.message)
- # resp = sms.send()
- # print(resp.text)
|