marnecM
Convex Community16mo ago
8 replies
marnec

resend not working in internalMutation

I had a problem where I wasn't able to send emails with Resend.

My API key was configured, my resend domain was verified and magic link email were working fine
(after setting the
from
param). But when I tried to send emails at runtime
resend.emails.send()
would give the error

{
  name: 'application_error',
  message: 'Unable to fetch data. The request could not be resolved.'
}


After a long time debugging I found out that my problem was that I was trying to send emails from an
internalMutation
. I switched to
internalAction
and all immediately worked.

Could someone please explain the reason for this?

I also read the docs extensively but I hadn't found or anticipated that this would happen
Was this page helpful?