~khumba/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] Allow of use of STARTTLS when connecting to the SMTP server.

Details
Message ID
<20240504073300.14530-2-mcepl@cepl.eu>
DKIM signature
pass
Download raw message
Patch: +12 -1
Signed-off-by: Matěj Cepl <mcepl@cepl.eu>
---
 import_issues.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/import_issues.py b/import_issues.py
index 6dbab71..5696eb7 100755
--- a/import_issues.py
+++ b/import_issues.py
@@ -745,6 +745,12 @@ def main():
        help="Use SMTP over SSL.",
    )

    parser.add_argument(
        '--smtp-starttls',
        action='store_true',
        help="Use STARTTLS.",
    )

    parser.add_argument(
        '--smtp-user',
        help="SMTP username.",
@@ -798,6 +804,7 @@ def main():
        smtp = None
    elif mode == 'send':
        smtp_ssl = args['smtp_ssl']
        smtp_starttls = args['smtp_starttls']
        smtp_host = args['smtp_host'] or os.environ.get('SMTP_HOST', 'localhost')
        smtp_port = args['smtp_port'] or os.environ.get('SMTP_PORT', 465 if smtp_ssl else 25)
        smtp_user = args['smtp_user'] or os.environ.get('SMTP_USER', None)
@@ -813,7 +820,11 @@ def main():
        else:
            smtp = smtplib.SMTP(host=smtp_host, port=smtp_port)

        # If SMTP isn't working: smtp.set_debuglevel(2)
        # If SMTP isn't working:
        # smtp.set_debuglevel(2)

        if smtp_starttls:
            smtp.starttls()

        if smtp_user:
            smtp.login(smtp_user, smtp_password)
-- 
2.44.0
Details
Message ID
<20240504155255.5ab4bf04@khumba.net>
In-Reply-To
<20240504073300.14530-2-mcepl@cepl.eu> (view parent)
DKIM signature
pass
Download raw message
On Sat,  4 May 2024 09:32:53 +0200
Matěj Cepl <mcepl@cepl.eu> wrote:

> Signed-off-by: Matěj Cepl <mcepl@cepl.eu>
> ---
>  import_issues.py | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)

Applied, thank you!

- Bryan
Reply to thread Export thread (mbox)