diff options
Diffstat (limited to 'pym/portage_mail.py')
-rw-r--r-- | pym/portage_mail.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/portage_mail.py b/pym/portage_mail.py index 99ed77fda..d12f85c07 100644 --- a/pym/portage_mail.py +++ b/pym/portage_mail.py @@ -74,7 +74,11 @@ def send_mail(mysettings, message): try: if int(mymailport) > 100000: myconn = smtplib.SMTP(mymailhost, int(mymailport) - 100000) + myconn.ehlo() + if not myconn.has_extn("STARTTLS"): + raise portage_exception.PortageException("!!! TLS support requested for logmail but not suported by server") myconn.starttls() + myconn.ehlo() else: myconn = smtplib.SMTP(mymailhost, mymailport) if mymailuser != "" and mymailpasswd != "": |