webhooks api improvements
atallo opened this issue · 4 comments
I am using the system, and I see three points that could be improved.
-
Is there a way to indicate rejecting an email and that the server says the reason? (excess quota, unknown user...)
-
Also, how can you know the user who receives the mail? If BCC is used, it does not appear anywhere in the data provided.
-
Remove spam check. I get a lot of emails that are being incorrectly rejected as spam. (Even using the paid plan and disabling it)
Please take it into consideration. Thanks
I just checked and currently several of the requests are already working.
- Pending. Emails can be rejected by indicating 404, but there is no way to indicate any text.
- Completed. This information is available in: recipients
- Pending. It may not make sense to implement it. A log was added and can be easily debugged.
Thank you for improving the service day by day.
We have added session.recipient
(email) value to the webhook payload. This is now deployed.
In the near future we are adding X-Original-To
header, which will have the same value.
Regarding pending, you can actually do more than just 404
.
If the error code (via HTTP request) was detected to be one of the following, then we will respond to senders with 421
SMTP status code to try again later.
EADDRGETNETWORKPARAMS
EBADFAMILY
EBADFLAGS
EBADHINTS
EBADNAME
EBADQUERY
EBADRESP
EBADSTR
ECANCELLED
ECONNREFUSED
EDESTRUCTION
EFILE
EFORMERR
ELOADIPHLPAPI
ENODATA
ENOMEM
ENONAME
ENOTFOUND
ENOTIMP
ENOTINITIALIZED
EOF
EREFUSED
ESERVFAIL
ETIMEOUT
If the HTTP status code returned is 408
, 413
, 429
, or 550
, then we will respond to senders with 421
SMTP status code to try again later.
Also, if you respond with a 500 error, then the email will fail. We don't support response messages yet that get passed from the webhook to the sender. Instead we have a generic response of "Internal Server Error". We hope to have support for this added in the future.