Skip to content
Send emails
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
templates
Gemfile
Gemfile.lock
LICENSE
Procfile
README.md
app.rb

README.md

ZECA

Send emails through Mailgun. Cross domain is enabled for the allowed domains.

Routes

POST /contact - send emails, requires name, email, phone and message params
POST /subscribe - subscribe to mailing list, requires address param

Environment Variables

ALLOWED_DOMAIN
MAILGUN_API_TOKEN
MAINGUN_RECEIVER
MAINGUN_DOMAIN
MAILGUN_MAILING_LIST

Examples

Send email

$.ajax({
  type: 'POST',
  url: 'http://localhost:4567/contact',
  data: { name: '', email: '', phone: '', message: '' },
  success: function() {
    doSomething();
  }
});

Subscribe to mailing list

$.ajax({
  type: 'POST',
  url: 'http://localhost:4567/subscribe',
  data: { address: 'foo@bar.com' },
  success: function() {
    doSomething();
  }
});

Development

$ git clone git@github.com:jaya/zeca.git
$ cd zeca
$ bundle install
$ ruby app.rb
You can’t perform that action at this time.