sendEmail
fun sendEmail(from: Email, to: List<Email>, cc: List<Email> = emptyList(), bcc: List<Email> = emptyList(), subject: String, html: String)
Sends an email via the Resend API.
A successful send is logged at info level with the recipient counts and the Resend message id. Recipient addresses are not logged, since they are personal data. A failure is thrown rather than logged, so the caller decides how to report it.
Parameters
from
the sender email address.
to
the list of recipient email addresses.
cc
the list of CC recipient email addresses. Defaults to empty.
bcc
the list of BCC recipient email addresses. Defaults to empty.
subject
the email subject line.
html
the HTML body content of the email.
Throws
com.resend.core.exception.ResendException
if Resend rejects the request (a non-2xx response).
if the request cannot be delivered (DNS, connection or read timeout); the Resend SDK wraps the underlying java.io.IOException as its cause.