sairam / formhail

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Flow

Regular User Flow

  1. A user comes in, enters his email address in his own form
  2. User submits the form to https://domain.com/email@example.com
  3. When the email address is not associated with the Page/Domain
  4. An email is sent to confirm the user containing how to add optional UID
  5. When the user clicks the confirmation link 1. Domain/user combo is confirmed 1. Redirects to enter additional notifications like slack/webhook
  6. When the user clicks on Report Spam link, email id is added to blacklist
  7. The email link confirms for the Page, Slack Hook, form ID
  8. The user is redirect back to the same page if _next is not set. _next is limited to the same proto+FQDN
  9. Once the confirmation is made, an email is sent to the user with the submitted form
  10. When a user's customer comes in and submits the form, he gets redirected to _next page or referral page

Support options from FrontEnd

  • Form Options
    • form submission as POST to https://domain.com/email@example.com
    • \_replyto/email
    • \_next page to redirect to
    • \_subject - Email subject
    • \_cc - extra email addresses comma separated
    • \_format - plain default is html
    • \_gotcha - honeypot with hidden. if filled, will ignore the request
    • sending via AJAX via Accept header to application/json
  • submission to https://domain.com/uid
    • configuration is done through login via email of link which is valid for one time use
    • form ID generation will get a name along with other options/notification settings
    • 6-char prefix is limited to the FQDN+domain
    • rate limits apply on FQDN+domain and email id separately in Basic/Free plan
    • any option from the POSTed form gets preference
  • Slack & Webhook notifications
  • Limit on notifications based on NotificationType+Creds(limit emails to 1k submissions per duration)
  • Site Wide confirmation for multiple forms

Email Templates

  • Login Request Email (to authenticate the user), instead of the password
  • Confirmation Email
  • Submission Email

Love to Have Features

  1. An intermediate page will show with a captcha (optional)
  2. Option to send one email is sent per hour/day to avoid spam with delimiters like horizontal line or 20 at a time
  3. Custom Validation based on regexp like phone / email address
  4. Option to mark a message as Spam will consider the IP address and subject
  5. Auto Confirm message to requester
  6. GYOC - get your own credentials for signed stuff like from and to
  7. Support SMS notification
  8. Support Attachments via FileStack / s3
  9. Paid feature for s3 upload + bandwidth with option of signed link to download

Deployment

  • Set environment variables set -a ; . .env ; set +a

Pre-Requirements

  • Install redis and start redis-server
  • gem install mailcatcher and start mailcatcher

Development

  • go get -u github.com/gorilla/schema
  • go get -u github.com/sairam/kinli
  • set -a ; . .env ; set +a
  • go run cmd/main.go

About


Languages

Language:Go 76.9%Language:HTML 23.1%