Skip to content

smtplib documentation of mail_options/rcpt_options does not cover key-value case #124864

Open
@codeZeilen

Description

@codeZeilen

smtplib's sendmailand send_message support the arguments mail_options and rcpt_options which both take a list of ESMTP options. However, the documentation does only describe the single word case not the key-value case.

The caller may pass a list of ESMTP options (such as 8bitmime) to be used in MAIL FROM commands as mail_options. ESMTP options (such as DSN commands) that should be used with all RCPT commands can be passed as rcpt_options.

To determine the correct format, users need to read the library source code. Maybe this could directly be extended to:

The caller may pass a list of ESMTP options as strings (such as "8bitmime") to be used in MAIL FROM commands as mail_options. ESMTP options (such as DSN commands) that should be used with all RCPT commands can be passed as rcpt_options (such as "NOTIFY=SUCCESS,FAILURE").

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions