Skip to content

Suggestion: better documentation of emails parameter for send_batch and send_template_batch #212

@gregsadetsky

Description

@gregsadetsky

The documentation for send_batch and send_template_batch both mention:

Parameters
emails – Email instances or dictionaries

However, emails is actually equivalent to *args, i.e. emails internally captures (within send_batch and send_template_batch) all arguments passed to the function. The variable name emails is not actually exposed to the caller, and so isn't properly a "parameter".

Calling:

postmark.emails.send_batch(emails=[email, another_email])

will not work -- the function will instead confusingly return an empty array.

Just in case anybody comes here to troubleshoot this, the correct way to call the functon is rather:

postmark.emails.send_batch(email, another_email)
# ... or alternatively ...
my_emails = [email, another_email]
postmark.emails.send_batch(*my_emails)

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions