parent
546ef9393b
commit
1e77a2787e
5 changed files with 53 additions and 4 deletions
Binary file not shown.
@ -1,3 +1,9 @@ |
||||
# aspin-pmo |
||||
## aspin-pmo ## |
||||
|
||||
Projeto de automação do Escritório de Projetos Aspin |
||||
**Por Adriano Baumart** |
||||
Projeto de automação do Escritório de Projetos Aspin. |
||||
|
||||
|
||||
### RELEASE NOTES ### |
||||
v1.0.0 |
||||
- Construção da estrutura de arquivos. |
||||
@ -0,0 +1,15 @@ |
||||
# Manipulando arquivos de Excell |
||||
import pandas as pd |
||||
from time import sleep |
||||
arquivo = 'Chatbots-Controle.xlsx' |
||||
aba = 'Em andamento' |
||||
header = 0 |
||||
file = pd.read_excel(arquivo, sheet_name=aba, header=header) |
||||
|
||||
#print(file['PROJETO']) |
||||
cod = int(input('Código do Projeto: ')) |
||||
|
||||
for c in range(0, len(file)): |
||||
#print(file['CLIENTE'][c]) |
||||
if file['PROJETO'][c] == cod: |
||||
print(f'Cliente: {file["CLIENTE"][c]}') |
||||
@ -0,0 +1,30 @@ |
||||
import smtplib |
||||
import email.message |
||||
|
||||
def enviar_email(): |
||||
corpo_email = """ |
||||
<p>Olá Mundo!</p> |
||||
<p>Testes com Python</p> |
||||
""" |
||||
|
||||
msg = email.message.Message() |
||||
msg['Subject'] = "Testes com Python" |
||||
msg['From'] = 'adriano.baumart@aspin.inf.br' |
||||
msg['To'] = "tcheweb@gmail.com; adriano@baumart.com.br" |
||||
password = 'As1453!@' |
||||
msg.add_header('Content-Type', 'text/html') |
||||
msg.set_payload(corpo_email) |
||||
|
||||
s = smtplib.SMTP('email-ssl.com.br: 587') |
||||
s.starttls() |
||||
# Login Credentials for sending the mail |
||||
s.login(msg['From'], password) |
||||
s.sendmail(msg['From'], [msg['To']], msg.as_string().encode('utf-8')) |
||||
print('Email enviado') |
||||
|
||||
|
||||
# In[ ]: |
||||
|
||||
|
||||
enviar_email() |
||||
|
||||
Loading…
Reference in new issue