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_bcc(
  resend: ResendEmail,
  bcc: List(String),
) -> ResendEmail
pub fn with_cc(
  resend: ResendEmail,
  cc: List(String),
) -> ResendEmail
pub fn with_html(
  resend: ResendEmail,
  html: String,
) -> ResendEmail
pub fn with_reply_to(
  resend: ResendEmail,
  reply_to: List(String),
) -> ResendEmail
pub fn with_text(
  resend: ResendEmail,
  text: String,
) -> ResendEmail
Search Document