Skip to content

h1u2i3/submail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Submail

Third-party Submail SDK.

Installation

If available in Hex, the package can be installed as:

  1. Add submail to your list of dependencies in mix.exs:
```elixir
def deps do
  [{:submail, github: "h1u2i3/submail"}]
end
```
  1. Ensure submail is started before your application:
```elixir
def application do
  [applications: [:submail]]
end
```

Send Sms

  1. Use the Submail.Sms module

      alias 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
  2. 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

TODO

  • Add base http request module.
  • Add sms xsend, multixsend support.
  • Add email xsend, send support.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages