resend/emails
Types
pub type ResendEmail {
ResendEmail(
client: Resend,
from: String,
to: List(String),
subject: String,
bcc: Option(List(String)),
cc: Option(List(String)),
reply_to: Option(List(String)),
html: Option(String),
text: Option(String),
)
}
Constructors
-
ResendEmail( client: Resend, from: String, to: List(String), subject: String, bcc: Option(List(String)), cc: Option(List(String)), reply_to: Option(List(String)), html: Option(String), text: Option(String), )
pub type SendEmailError {
RequestError
BadRequestError
ParseResponseBodyError
}
Constructors
-
RequestError
-
BadRequestError
-
ParseResponseBodyError
pub type SuccessResponse {
SuccessResponse(id: String)
}
Constructors
-
SuccessResponse(id: String)
Functions
pub fn create_email(
client client: Resend,
from from: String,
to to: List(String),
subject subject: String,
) -> ResendEmail
pub fn send_email(
email: ResendEmail,
) -> Result(SuccessResponse, SendEmailError)
pub fn with_reply_to(
resend: ResendEmail,
reply_to: List(String),
) -> ResendEmail