SparkPost / python-sparkpost

SparkPost client library for Python
https://www.sparkpost.com
Other
92 stars 70 forks source link

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

Open davidgg090 opened 2 years ago

davidgg090 commented 2 years ago

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'
    )