|
@@ -95,16 +95,16 @@ def find_key_from_mail_adress(mail_address:str) -> Union[str,None]:
|
95
|
95
|
|
96
|
96
|
class MailFetcher(object):
|
97
|
97
|
|
98
|
|
- def __init__(self,host,port,user,password,folder,delay):
|
|
98
|
+ def __init__(self,host,port,user,password,folder,delay,endpoint):
|
99
|
99
|
self._connection = None
|
100
|
100
|
self._mails = []
|
101
|
|
-
|
102
|
101
|
self.host = host
|
103
|
102
|
self.port = port
|
104
|
103
|
self.user = user
|
105
|
104
|
self.password = password
|
106
|
105
|
self.folder = folder
|
107
|
106
|
self.delay = delay
|
|
107
|
+ self.endpoint = endpoint
|
108
|
108
|
|
109
|
109
|
self._is_active = True
|
110
|
110
|
|
|
@@ -181,5 +181,5 @@ class MailFetcher(object):
|
181
|
181
|
"content": decoded_mail['body']
|
182
|
182
|
}}
|
183
|
183
|
|
184
|
|
- requests.post('http://localhost:8080/events',json=msg)
|
|
184
|
+ requests.post(self.endpoint,json=msg)
|
185
|
185
|
pass
|