Third-party Submail SDK.
If available in Hex, the package can be installed as:
- Add
submail
to your list of dependencies inmix.exs
:
```elixir
def deps do
[{:submail, github: "h1u2i3/submail"}]
end
```
- Ensure
submail
is started before your application:
```elixir
def application do
[applications: [:submail]]
end
```
-
Use the
Submail.Sms
modulealias Submail.Sms [] |> Sms.add_appid("appid") |> Sms.add_appkey("appkey") |> Sms.add_project("project") |> Sms.add_to("13888888888") |> Sms.add_vars(code: "132456") |> Sms.xsend
-
Create your own module:
defmodule Sms.Register do use Submail, appid: "appid", appkey: "appkey" use Submail.Sms, project: project end [] |> Sms.Register.add_to("13888888888") |> Sms.Register.add_vars(code: "668726") |> Sms.Register.xsend
- Add base http request module.
- Add sms
xsend
,multixsend
support. - Add email
xsend
,send
support.