gontact

command module
v0.0.0-...-534333a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2016 License: MIT Imports: 5 Imported by: 0

README

GOntact

GOntact is a simple service to send contact form data by email, its propose is to provide a simple service that could be used by any website against Slack or multiple transactional email services such as Mandril, MailGun, and SendGrid.

GOntact provides a simple POST endpoint /contact, where it expects to receive the following parameters, that will be sent to your GONTACT_EMAIL or a given Slack.

  • Name
  • Email (optional)
  • Address
  • Subject (optional)
  • Message
  • Website Address (optional)

GOntact returns 422 if required parameters are not being passed, otherwise it will return 201, if there is any provider error it returns a 50X error.

Security

GOntact is secured by a environment variable GONTACT_TOKEN that should be passed on the request's X-Gontact-Token header.

[TODO: JWT]

Providers

GOntact built in providers:

Slack

In order to activate this one please set GONTACT_PROVIDER=SLACK in your Environment. It uses the following Env variables:

  • SLACK_WEBHOOK_URL (Required)
  • SLACK_CHANNEL (optional default: "notifications")
  • SLACK_USERNAME (optional default: "Gontact")
  • SLACK_EMOJI (optional default: "mailbox")
Mandrill

In order to activate this one please set GONTACT_PROVIDER=MANDRILL in your Environment. It uses the following Env variables:

  • MANDRILL_KEY (Required)
  • MANDRILL_TO (Required)
  • MANDRILL_FROM (Required)
  • MANDRILL_SUBJECT (optional default: "Contact")
SendGrid (comming soon)
MailGun (comming soon)
SMTP (comming soon)

GOntact is Copyright © 2008-2015 Wawandco SAS. It is free software, and may be redistributed under the terms specified in the LICENSE file.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL