SmsUp.Delivery.LoggerDelivery (sms_up v1.0.0) View Source

Print the sms to the console and do not send it to any API. Usefull for dev environment and testing.

Link to this section Summary

Functions

Deliver the SMS to the console. Provide a valid international number, the body of the message and a optional list of options (mostly used by real sms api).

Link to this section Functions

Link to this function

deliver(to, body, options \\ [])

View Source

Specs

deliver(String.t(), String.t(), Keyword.t()) ::
  {:ok, %{body: String.t(), to: String.t(), options: Keyword.t()}}

Deliver the SMS to the console. Provide a valid international number, the body of the message and a optional list of options (mostly used by real sms api).

Examples

iex> SmsUp.Delivery.LoggerDelivery.deliver("+41765556677", "Hello")
{:ok, %{to: "+41765556677", body: "Hello", options: []}}

iex> SmsUp.Delivery.LoggerDelivery.deliver("+41765556677", "Hello", [option: 1])
{:ok, %{to: "+41765556677", body: "Hello", options: [option: 1]}}