aliyun_sms v0.1.1 Aliyun.Sms

Documentation for Aliyun.Sms.

Link to this section Summary

Link to this section Functions

Link to this function send(phones, sign_name, template, template_params \\ %{}, up_extend_code \\ nil, out_id \\ nil)
send(binary() | [any()], any(), any(), map(), any(), any()) ::
  {:ok, map()} | {:error, any(), any()}

发送短信.

Examples

Aliyun.Sms.send("1500000000", "sign", "template", %{code: "222333"})
{:ok, %{"Code" => "OK", "Message" => "OK", ...}}
{:error, code, %{"Code" => "isv.SMS_SIGNATURE_ILLEGAL", "Message" => "短信签名不合法"}}
{:error, :http_error, reason}
{:error, :json_decode_error, body}