sendinblue / APIv3-python-library

SendinBlue's python library for API v3
MIT License
82 stars 40 forks source link

Fix bug in send_smtp_email.py #50

Closed tarraschk closed 3 years ago

tarraschk commented 4 years ago

Resolves an issue encountered with the examples.

to = [{"email": "confidential@domain.fr"}]

Before this fix:

  File "/home/ubuntu/.local/lib/python3.6/site-packages/sib_api_v3_sdk/models/send_smtp_email.py", line 85, in __init__
    self.to = to
  File "/home/ubuntu/.local/lib/python3.6/site-packages/sib_api_v3_sdk/models/send_smtp_email.py", line 151, in to
    raise ValueError("Invalid value for `to`, must not be `None`")  # noqa: E501
ValueError: Invalid value for `to`, must not be `None`

=> It does not work

After this fix:

{'message_id': '<CONFIDENTIAL@smtp-relay.mailin.fr>'}

=> It works

ruudy-sib commented 3 years ago

Hi @tarraschk The bug has been fixed. You can download the latest version from here Thanks!