Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
caputchinefrobles committed Dec 26, 2017
1 parent f60569d commit 8d780db
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,18 @@ servidores_pesquisa.append(Servidor('CICLANO DE TAL',["[email protected]
Para que os alertas sejam enviados, é necessário informar o endereço de SMTP e a porta utilizada além do respectivo usuário e senha para o serviço. Para isto, basta substituir os valores de [email protected], host_smtp, usuario_smtp e senha_smtp dentro da função enviar_log:

```python
**message = Message(From="[email protected]__", To=emails_destino, charset="utf-8")**

if extra:
message.Subject = "DouFinder - EDIÇÃO EXTRA"
else:
message.Subject = "DouFinder"

message.Body = mensagem

try:
sender = Mailer('host_smtp', port=25)
sender.login('usuario_smtp', 'senha_smtp')
**sender = Mailer('__host_smtp__', port=25)**
**sender.login('__usuario_smtp__', '__senha_smtp__')**
sender.send(message)
except smtplib.SMTPRecipientsRefused as e:
```

0 comments on commit 8d780db

Please sign in to comment.