python-sparkpost icon indicating copy to clipboard operation
python-sparkpost copied to clipboard

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

Open davidgg090 opened this issue 3 years ago • 0 comments

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='[email protected]',
        subject='Data'
    )

davidgg090 avatar May 25 '22 16:05 davidgg090