Mailtrap.Sandbox (mailtrap v0.1.1)

Mailtrap Sandbox API client



=, "test/support/invoice.pdf")) attachment =, "invoice1.pdf") %Mailtrap.Email{} |> Mailtrap.Email.put_from("Sender", "") |> Mailtrap.Email.put_to([{"Lolek", ""}, {"Bolek", ""}]) |> Mailtrap.Email.put_subject("Bla bla") |> Mailtrap.Email.put_text("Text bla bla") |> Mailtrap.Email.put_attachments([attachment]) |> Mailtrap.Sandbox.send(111) # 111 is inbox id

Link to this section Summary


Generates client

Sends an email to sandbox inbox

Link to this section Functions

@spec client(String.t()) :: Tesla.Client.t()

Generates client

Link to this function

send(client, email, inbox_id)

@spec send(Tesla.Client.t(), Mailtrap.Email.t(), integer()) ::
  {:ok, map()} | {:error, Tesla.Env.t()}

Sends an email to sandbox inbox