GithubHelp home page GithubHelp logo

campact / mailhook Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ushis/mailhook

0.0 4.0 0.0 39 KB

Micro service receiving mails and posting them to web hooks.

License: MIT License

Go 99.34% Dockerfile 0.66%

mailhook's Introduction

mailhook

Build Status Go Report Card Docker Pulls

Micro service receiving emails and posting them to web hooks.

Usage

mailhook -hook-dir /etc/mailhook/hooks -listen :25

Hook Directory

A hook directory contains a number of hook files with .yml extension.

Hook File

A hook file includes a YAML encoded set of web hooks and email address patterns.

---
# catch mails to [email protected] and [email protected]
- hook: 'https://api.example.com/v1/mails'
  emails:
    - '[email protected]'

# catch mails to *@example.net and *@example.org
- hook: 'http://example.net/messages'
  emails:
    - '@example.net'
    - '@example.org'

# catch all mails
- hook: 'http://example.net/fallback'
  emails:
    - '@'

Payload

The request that will be sent to the HTTP endpoint will be encoded as multipart/form-data with the following payload:

Field Value
mail[sender] SMTP sender address
mail[recipient] SMTP recipient address
mail[message][from][][name] Names taken from the From header
mail[message][from][][email] Adresses takem from the From header
mail[message][to][][name] Names taken from the To header
mail[message][to][][email] Adresses takem from the To header
mail[message][cc][][name] Names taken from the Cc header
mail[message][cc][][email] Adresses takem from the Cc header
mail[message][bcc][][name] Names taken from the Bcc header
mail[message][bcc][][email] Adresses takem from the Bcc header
mail[message][reply_to][][name] Names taken from the ReplyTo header
mail[message][reply_to][][email] Adresses takem from the ReplyTo header
mail[message][subject] Subject of the message
mail[message][date] RFC3339 encoded date of the message
mail[message][message_id] ID taken from the MessageID header
mail[message][in_reply_to] ID taken from the InReplyTo header
mail[message][references][] IDs taken from the References header
mail[message][text] Text body of the message
mail[message][html] HTML body of the message (can be empty)
mail[message][attachments][] Attachments of the message

1.2.1

mailhook's People

Contributors

ushis avatar aboutnick avatar

Watchers

James Cloos avatar  avatar Blanca avatar Stefan Walluhn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.