Closed brenonsc closed 5 months ago
hey @brenonsc thanks for reporting this issue 😊
could you confirm to me if the method you're trying to use is the regular send
api and not the batch
api ?
If its the regular send
your code would look something similar to this ?
params = {
"from": "example@example.com",
"to": ["example1@e.com", "example2@e.com", "invalid"],
"subject": "hi",
"html": "<strong>hello, world!</strong>",
}
resend.Emails.send(params)
Hello, @drish
Yes, it is the regular send
api, my code looks exactly like this.
Thanks in advance!
hey @brenonsc sorry for the delay to reply to you here.
that is the behaviour of the Resend API at the moment, I don't think there are any plans to change for now. you could submit a support ticket on the resend website and ask for that feature to be implemented.
let me know if there's anything else I could help you with
thanks again
Bug Description
When attempting to send an email to multiple addresses using the resend service, if one of the email addresses is invalid and does not follow the email@example.com or Name email@example.com format, the service returns a 422 error with the message: "Invalid 'to' field. The email address needs to follow the email@example.com or Name email@example.com format." However, the issue is that this error is applied to all email addresses provided, causing the email not to be sent to any of them.
Expected Behavior
The expected behavior should be that if there is an error in one of the email addresses, the resend service should still attempt to send the email to the remaining valid addresses and provide details about the specific invalid address.
Steps to Reproduce
Thank you for addressing this issue.