mail login starttls
This commit is contained in:
parent
b1012d2ce3
commit
184e13b698
5
main.py
5
main.py
@ -1,5 +1,6 @@
|
|||||||
import configparser
|
import configparser
|
||||||
from imaplib import IMAP4
|
from imaplib import IMAP4
|
||||||
|
import ssl
|
||||||
|
|
||||||
from sqlalchemy import create_engine
|
from sqlalchemy import create_engine
|
||||||
|
|
||||||
@ -18,13 +19,15 @@ def init_database():
|
|||||||
|
|
||||||
|
|
||||||
def get_gpx_files_from_mail():
|
def get_gpx_files_from_mail():
|
||||||
|
mail.starttls(ssl.create_default_context())
|
||||||
mail.login(config['mail']['username'], config['mail']['password'])
|
mail.login(config['mail']['username'], config['mail']['password'])
|
||||||
|
|
||||||
mail.logout()
|
mail.logout()
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
pass
|
init_database()
|
||||||
|
get_gpx_files_from_mail()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user