sendgrid-go | The Official Twilio SendGrid Golang API Library | Email library
kandi X-RAY | sendgrid-go Summary
kandi X-RAY | sendgrid-go Summary
NEW: Subscribe to email notifications for releases and breaking changes. Version 3.X.X of this library provides full support for all Twilio SendGrid Web API v3 endpoints, including the new v3 /mail/send. This library represents the beginning of a new path for Twilio SendGrid. We want this library to be community driven and Twilio SendGrid led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create issues and pull requests or simply upvote or comment on existing issues or pull requests. Please browse the rest of this README for further detail.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of sendgrid-go
sendgrid-go Key Features
sendgrid-go Examples and Code Snippets
Community Discussions
Trending Discussions on sendgrid-go
QUESTION
Using SendGrid to schedule an email, but then I cancel it right away and delete (looking at scheduled_events shows that status is in fact canceled). However, e-mail is still delievered to user.
I know it says "You can cancel or pause all of the mail/send requests associated with a batch ID up to 10 minutes before the scheduled send time by passing a batch_id to the "Cancel or pause a scheduled send" endpoint." (https://docs.sendgrid.com/api-reference/cancel-scheduled-sends/delete-a-cancellation-or-pause-from-a-scheduled-send)
But in this example code I have the time set to 20 minutes, and also tried it for 90 minutes and more and the emails was still delivered. Lastly, I tried doing the same with and without deleting the email (request4).
I contacted their support, but haven't received a response yet, and was wondering if I am doing something out of the ordinary or wrong here.
BTW, I checked the status code and responses - they all seem fine (added comments describing the printed out statuses)
Thanks
...ANSWER
Answered 2022-Mar-14 at 00:24When you send emails in a batch, you are able to cancel those emails by cancelling the batch. However, I think what you are doing here is cancelling the cancellation by deleting the batch.
When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their send_at value is reached, they will be discarded.
When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their send_at value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired.
The batch holds the cancelled/paused status but the messages remain in the queue. If you delete the batch, then the messages are still in the queue and no longer know that they are cancelled.
To fix this, I believe you need to stop your above code at your 3rd request. Do not perform request 4 (deleting the batch) and your messages should fail to send as required.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sendgrid-go
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page