-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemail_provider.py
More file actions
34 lines (26 loc) · 787 Bytes
/
email_provider.py
File metadata and controls
34 lines (26 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from email_message import EmailMessage
class EmailProvider:
def __init__(self, company, address):
self.company = company
self.address = address
self.inbox = []
self.outbox = []
def __show_password(self):
return "minhasenha"
def protect_password(self):
password = self.__show_password()
print(password[:3])
def send_email(self, subject, body, receiver):
email = EmailMessage(
subject,
body,
self.address,
receiver
)
email.subject()
email.get_subject()
email.set_subject("assunto novo")
self.outbox.append(email)
def open_outbox(self):
for email in self.outbox:
print("[*]", email.subject)