django-anymail
                                
                                
                                
                                    django-anymail copied to clipboard
                            
                            
                            
                        SendInBlue's scheduled email sending using "scheduledAt"
In your documentation, and more specifically in Supported ESPs > SendInBlue > Limitations and quirks > No delayed sending, it is mentioned that "delayed sending" is not supported in Sendinblue ("Sendinblue does not support send_at"), however, in the official documentation of SendInBlue, I have found that individual scheduled messages can be sent using the "scheduledAt" field.
Could you confirm that this is valid, and If it is, can you also update Anymail's docs and code?
Also, given the opportunity, I'd like to thank you for the great work :)
- Anymail version: v8.6 LTS
 - SendInBlue
 
@dimitrisor thanks for the pointer. Looks like Sendinblue introduced scheduled sending a few months ago. (And they're still describing the feature as a "beta" in their main docs.)
First, if you need this right away, Anymail's esp_extra allows using new ESP features before Anymail's code catches up:
send_at = datetime.datetime(..., tzinfo=...)  # be sure to use a timezone
message.esp_extra = {"scheduledAt": send_at.isoformat(timespec="seconds")}
But yes, we should definitely update Anymail. I'm finishing up some other projects and won't be able get to this for a couple of weeks. If you'd like to give it a try before then, you could:
- Add a 
set_send_at()method toSendinBluePayload, that setsself.data["scheduledAt"]appropriately. You could probably model this onSparkPostPayload.set_send_at(), which uses the same ISO datetime format. - Update 
test_send_at()in test_sendinblue_backend.py, to check Sendinblue's"scheduledAt"parameter is set correctly. (Again, you could probably borrow from the SparkPost equivalent.) - Update the docs [or I can do that later, too]