View Source Resend (resend v0.4.4)

Documentation for Resend.

Summary

Functions

Returns a Resend client.

Loads config values from the application environment.

Types

@type config() :: [api_key: String.t(), base_url: String.t(), client: atom()]

Functions

Link to this function

client(config \\ config())

View Source
@spec client(config()) :: Resend.Client.t()

Returns a Resend client.

Accepts a keyword list of config opts, though if omitted then it will attempt to load them from the application environment.

@spec config() :: config()

Loads config values from the application environment.

Config options are as follows:

config :resend, Resend.Client
  api_key: "re_1234567",
  base_url: "https://api.resend.com",
  client: Resend.Client.TeslaClient

The only required config option is :api_key. If you would like to replace the HTTP client used by Resend, configure the :client option. By default, this library uses Tesla, but changing it is as easy as defining your own client module. See the Resend.Client module docs for more info.