Commit 913d1524 by Owo Sugiana

SMTP dengan SSL

1 parent b55db6bc
...@@ -103,7 +103,7 @@ def main(argv=sys.argv[1:]): ...@@ -103,7 +103,7 @@ def main(argv=sys.argv[1:]):
job_files = os.listdir(cf['job_dir']) job_files = os.listdir(cf['job_dir'])
if first or job_files: if first or job_files:
log.debug(f'Connect to {cf["host"]}:{cf["port"]}') log.debug(f'Connect to {cf["host"]}:{cf["port"]}')
with smtplib.SMTP(cf['host'], cf['port']) as server: with smtplib.SMTP_SSL(cf['host'], cf['port']) as server:
if cf['tls']: if cf['tls']:
server.starttls() server.starttls()
log.debug(f'Login sebagai {cf["username"]}') log.debug(f'Login sebagai {cf["username"]}')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!