All Projects → Nebo15 → mouth

Nebo15 / mouth

Licence: MIT license
Simple adapter based SMS sending library

Programming Languages

elixir
2628 projects
HTML
75241 projects

Projects that are alternatives of or similar to mouth

aws-sqs-sns-client
AWS SNS SQS client UI
Stars: ✭ 26 (-10.34%)
Mutual labels:  sqs
sns-sqs-big-payload
Amazon SNS/SQS client library that enables sending and receiving messages with payload larger than 256KiB via Amazon S3.
Stars: ✭ 40 (+37.93%)
Mutual labels:  sqs
dramatiq sqs
A Dramatiq broker that can be used with Amazon SQS.
Stars: ✭ 41 (+41.38%)
Mutual labels:  sqs
SinchBundle
📦 Provides integration with Sinch.com SMS API.
Stars: ✭ 12 (-58.62%)
Mutual labels:  sms
twilito
A tiny, zero dependency Ruby helper for sending text messages with Twilio 💬
Stars: ✭ 16 (-44.83%)
Mutual labels:  sms
org-mode-sms-inbox
Harvest org-mode todos with Dropbox, Twilio, and IFTTT.
Stars: ✭ 19 (-34.48%)
Mutual labels:  sms
botkit-sms
Twilio Programmable SMS implementation for Botkit.
Stars: ✭ 18 (-37.93%)
Mutual labels:  sms
FreeMobileSMS
🐍📲 Python client to send SMS via french mobile operator Free Mobile
Stars: ✭ 22 (-24.14%)
Mutual labels:  sms
Reborn
ReborN SMS BOMBER | SpeedX & 4NAT
Stars: ✭ 126 (+334.48%)
Mutual labels:  sms
sqs-quooler
A complete queue consumer for SQS
Stars: ✭ 23 (-20.69%)
Mutual labels:  sqs
multiOTPCredentialProvider
multiOTP Credential Provider is a V2 Credential Provider for Windows 7/8/8.1/10/2012(R2)/2016 with options like RDP only and UPN name support
Stars: ✭ 121 (+317.24%)
Mutual labels:  sms
PokerTexter
SMS App for Poker Odds. Runs on Flask + Twilio + Heroku.
Stars: ✭ 17 (-41.38%)
Mutual labels:  sms
smsender
A Go server for sending SMS
Stars: ✭ 32 (+10.34%)
Mutual labels:  sms
notifier
📟 Extensible library for building notifications and sending them via different delivery channels
Stars: ✭ 24 (-17.24%)
Mutual labels:  sms
totalvoice-node
Client em NodeJS para API da Totalvoice
Stars: ✭ 54 (+86.21%)
Mutual labels:  sms
vacomall
☀️☀️ 基于 dubbo 实现的分布式电商平台。
Stars: ✭ 42 (+44.83%)
Mutual labels:  sms
Liquid-Application-Framework
Liquid Application Framework documentation, useful links and sample project
Stars: ✭ 467 (+1510.34%)
Mutual labels:  sqs
sqs-exporter
A Prometheus Exporter for the Amazon Simple Queue Service (SQS)
Stars: ✭ 24 (-17.24%)
Mutual labels:  sqs
matrix-pstn-bridge
☎️ A Matrix Puppet bridge for the public telephone network that supports a number of VoIP providers (Twillo, Vonage, etc.). Sends and receives voice and SMS.
Stars: ✭ 25 (-13.79%)
Mutual labels:  sms
module-twilio
Magento 2 Customer SMS notifications with Twilio
Stars: ✭ 29 (+0%)
Mutual labels:  sms

Mouth Build Status Coverage Status

logo

Simple adapter based SMS sending library

Installation

This package can be installed by adding mouth to your list of dependencies in mix.exs:

def deps do
  [{:mouth, "~> 0.4.1"}]
end

Adapters

  • Mouth.SMS2IPAdapter - Simple SMS2IP adapter.
  • Mouth.TwilioAdapter - Adapter for sending SMS through Twilio.
  • Mouth.LocalAdapter - Delivers messages to an in-memory store. Useful for development when you don't want to send real SMS messages.
  • Mouth.TestAdapter - Adapter for test environment.

Getting Started

# In your config/config.exs file
#
# There may be other adapter specific configuration you need to add.
config :my_app, MyApp.Messenger,
  adapter: Mouth.SMS2IPAdapter,
  source_number: "TEST_NUMBER",
  gateway_url: "localhost:4000",
  login: "test",
  password: "password"

# Somewhere in your application
defmodule MyApp.Messenger do
  use Mouth.Messenger, otp_app: :my_app
end

# Define your messages
defmodule MyApp.Message do
  import Mouth.Message

  def send_password do
    new_message(
      to: "+380931234567",
      body: "12345"
    )

    # or pipe using Mouth.Message functions
    new_message
    |> to("+380931234567")
    |> body("12345")
  end
end

# In a controller or some other module
Message.send_password |> Messenger.deliver

Inbox preview in the browser

Mouth ships with a Plug that allows you to preview the messages in the local (in-memory) mailbox. It's particularly convenient in development when you want to check what your message will look like while testing the various flows of your application.

For email to reach this mailbox you will need to set your Mailer adapter to Swoosh.Adapters.Local:

# in config/dev.exs
config :my_app, MyApp.Messenger,
  adapter: Mouth.LocalAdapter

Then, use the Mix task to start the inbox preview server:

$ mix mouth.inbox.server

Or in your Phoenix project you can forward directly to the plug, like this:

# in web/router.ex
if Mix.env == :dev do
  scope "/dev" do
    pipe_through [:browser]

    forward "/inbox", Plug.Mouth.InboxPreview, [base_path: "/dev/inbox"]
  end
end

If you are curious, this is how it looks:

Plug.Mouth.InboxPreview

Contributing

Before opening a pull request, please open an issue first.

Once we've decided how to move forward with a pull request:

$ git clone https://github.com/nebo15/mouth.git
$ cd mouth
$ mix deps.get
$ mix test

Once you've made your additions and mix test passes, go ahead and open a PR!

Thanks!

Thanks to cool guys from Bamboo for inspiration, and Swoosh for the LocalAdapter.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].