Skip to content

Support RFC 6531 in smptlib #52735

Closed
Closed

Description

@iElectric
mannequin
BPO 8489
Nosy @warsaw, @tiran, @ezio-melotti, @bitdancer
Superseder
  • bpo-22027: RFC 6531 (SMTPUTF8) support in smtplib
  • Files
  • issue8489.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2015-05-16.19:51:23.599>
    created_at = <Date 2010-04-21.19:17:47.886>
    labels = ['easy', 'type-feature', 'library', 'expert-email']
    title = 'Support RFC 6531 in smptlib'
    updated_at = <Date 2015-05-16.19:51:23.597>
    user = 'https://bugs.python.org/iElectric'

    bugs.python.org fields:

    activity = <Date 2015-05-16.19:51:23.597>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2015-05-16.19:51:23.599>
    closer = 'r.david.murray'
    components = ['Library (Lib)', 'email']
    creation = <Date 2010-04-21.19:17:47.886>
    creator = 'iElectric'
    dependencies = []
    files = ['29181']
    hgrepos = []
    issue_num = 8489
    keywords = ['patch', 'easy']
    message_count = 9.0
    messages = ['103890', '103893', '103901', '172266', '172278', '182763', '182772', '182808', '182825']
    nosy_count = 9.0
    nosy_names = ['barry', 'exarkun', 'christian.heimes', 'iElectric', 'ezio.melotti', 'r.david.murray', 'dlam', 'moijes12', 'hhallman']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '22027'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue8489'
    versions = ['Python 3.5']

    Activity

    1. iElectric commented on Apr 21, 2010

      iElectricmannequin
      MannequinAuthor

      Module smtplib, line 574, in login
      Module smtplib, line 538, in encode_cram_md5
      Module hmac, line 72, in __init__
      TypeError: character mapping must return integer, None or unicode

      Following traceback occurs when doing connection.login(u'foobar@domain.com', 'justdoit') to issue an ESMTP.

      Python 2.6.4 (r264:75706, Mar 11 2010, 18:33:18)

    2. exarkun commented on Apr 21, 2010

      exarkunmannequin
      Mannequin

      SMTP (RFC 2821) doesn't support non-ASCII envelope addresses. A better behavior here would be for connection.login to raise a ValueError or a TypeError whenever a non-str is passed in.

      RFC 5336, though, adds the UTF8SMTP extension, which adds support for UTF-8 encoded unicode mailboxes. If the server advertises the UTF8SMTP capability, then smtplib could encode unicode using UTF-8 and pass it on.

      This is really a feature request (RFC 5336 support), not a bug.

    3. iElectric commented on Apr 21, 2010

      iElectricmannequin
      MannequinAuthor

      Plone currently just passes unicode data around, maybe additional documentation note will do for avoiding such trobules.

      Thanks for quick response.

    4. tiran commented on Oct 6, 2012

      @tiran
      Member

      I've changed the topic and set the version to 3.4.

    5. added
      stdlibStandard Library Python modules in the Lib/ directory
      on Oct 6, 2012
    6. changed the title [-]smtplib.SMTP.login() breaks with unicode input[/-] [+]Support UTF8SMTP as part of RFC 5336[/+] on Oct 6, 2012
    7. added
      type-featureA feature request or enhancement
      and removed
      type-crashA hard crash of the interpreter, possibly with a core dump
      on Oct 6, 2012
    8. bitdancer commented on Oct 7, 2012

      @bitdancer
      Member

      Woops, did not mean to close the issue.

    9. changed the title [-]Support UTF8SMTP as part of RFC 5336[/-] [+]Support UTF8SMTP as part of RFC 5336 in smtlib[/+] on Oct 7, 2012
    10. changed the title [-]Support UTF8SMTP as part of RFC 5336 in smtlib[/-] [+]Support UTF8SMTP as part of RFC 5336 in smptlib[/+] on Oct 7, 2012
    11. hhallman commented on Feb 23, 2013

      hhallmanmannequin
      Mannequin

      Can not reproduce the problem in 2.7
      Attaching a patch with test cases proving that the problem is solved.
      Patch based on current tip 2.7.

    12. bitdancer commented on Feb 23, 2013

      @bitdancer
      Member

      Well, this issue changed into a feature request for UTF8SMTP support, which I do intend to implement at some point.

      It does indeed appear like the original problem (not converting unicode strings into ASCII) was fixed in 2.7 at some point, though, which is good news, thanks.

    13. dlam commented on Feb 23, 2013

      dlammannequin
      Mannequin

      looks like RFC 6531 obsoletes 5336 --> http://datatracker.ietf.org/doc/rfc6531/

      (6531 says its the "Proposed Standard", whereas 5336 says its "Experimental" etc etc)

    14. bitdancer commented on Feb 23, 2013

      @bitdancer
      Member

      Thanks for the pointer. I keep reading "SMTPUTF8" as "SMTPUFF", but otherwise at a quick glance it looks like an improvement.

    15. changed the title [-]Support UTF8SMTP as part of RFC 5336 in smptlib[/-] [+]Support RFC 6531 in smptlib[/+] on Feb 23, 2013
    16. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      easystdlibStandard Library Python modules in the Lib/ directorytopic-emailtype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions