aliyun_sms v0.2.0 Aliyun.Sms.Client

Link to this section Summary

Link to this section Types

Link to this type error_code()
error_code() :: :http_error | :json_decode_error | String.t()

Link to this section Functions

Link to this function send_sms(phones, sign_name, template, template_params, up_extend_code \\ nil, out_id \\ nil)
send_sms(
  String.t(),
  String.t(),
  String.t(),
  map(),
  String.t() | nil,
  String.t() | nil
) :: {:ok, map()} | {:error, error_code(), String.t()}

发送短信.

Examples

Aliyun.Sms.send_sms("1500000000", "阿里云短信测试专用", "SMS_0000", %{code: "222333"})
{:ok, %{"Code" => "OK", "Message" => "OK", ...}}
{:error, code, %{"Code" => "isv.SMS_SIGNATURE_ILLEGAL", "Message" => "短信签名不合法"}}
{:error, :http_error, reason}
{:error, :json_decode_error, body}