Skip to content

At least one valid recipient is required Code: 5002 Description: none  #223

Description

@davidgg090

Hi guys, I'm trying to send emails through the Spark API but every now and then I get this error message, looking for info here (https://stackoverflow.com/questions/35771408/sparkpost-at-least-one-valid -recipient-is-required-python-django-api) comment that a correction was made but it still appears.
Django Version=3.0.8
Sparkpost version==1.3.8
My send email function is like this:

def send_email(email):
    sp = SparkPost()
    sp.transmissions.send(
        use_sandbox=False,
        recipients=[email],
        html='Bla bla',
        from_email='algo@mail.com',
        subject='Data'
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions