Skip to content

jaya/zeca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •