Giter Club home page Giter Club logo

mailbox's Introduction

Mailbox GitHub release Build Status Coverage Status license

簡易電子報發送系統,使用 Golang 實作。建立發送 campaign 資訊、匯入訂閱者資訊(群組標記)、簡易發送系統、開信追蹤與連結點擊追蹤。

以 docker container 運行。

Cmd

  1. mailbox campaign:建立 campaign,包含產生該 campaign 的亂數種子。
  2. mailbox user:匯入訂閱者的資訊。
  3. mailbox send:發送電子報,以 HTML 格式發送。
  4. mailbox server:接收開信訊息。

相關的操作請參考 -h 的說明,或 cmd/docs

Build Docker Image

toomore/mailbox:base

將基本的程式碼放入,相關的套件也一併下載。

sh ./build-base.sh

toomore/mailbox:cmd

只將編譯過的 cmd 程式放入。

sh ./build-min.sh;

Required

  1. AWS SES KEY, Token.
  2. Update ./Makefile run_cmd, ./dev-run-cmd.sh files.
    1. mailbox_ses_key:AWS SES KEY
    2. mailbox_ses_token:AWS SES Token
    3. mailbox_ses_sender:發送者的 email。如:Toomore Chiang <[email protected]>.
    4. mailbox_web_site:接收開信網址,不包含 https 與結尾。如:open.example.com.
    5. mailbox_ses_replyto: (選擇) 回信時的信箱。
  3. Nginx

Nginx config

需加入以下資訊到網域設定檔。

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Args $query_string;
proxy_set_header X-Uri $uri;

Run

Into container

make run_cmd

Support bash-completion

mailbox [tab][tab]
campaign  send      server    user

... and pretty help (using spf13/cobra)

mailbox -h

Import User data from csv

匯入訂閱者資訊的 csv 檔案,檔案內需包含 email, groups, f_name, l_name 欄位。

mailbox user import ./list.csv

可以使用 -d 來預覽資料讀取狀況

mailbox user import ./list.csv -d
...

Template Replace

利用 mailbox send -p [HTML path] 時,可以在指定的 HTML 檔案中放入可被替換參數。

  • {{FNAME}}:訂閱者的 first name
  • {{LNAME}}:訂閱者的 last name
  • {{READER}}:放置開信追蹤連結。例:<img src="{{READER}}">
  • {{WASHI}}...{{/WASHI}}:放置點擊後才替換的參數。例:{{WASHI}}http://example.com/?lname={{LNAME}}{{/WASHI}}

mailbox's People

Contributors

toomore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mailbox's Issues

已經不能用了嗎?拉不到docker images

~/Downloads/mailbox-2.7.1$ make run_cmd
docker run -it --rm
--link mailbox-mariadb-prod:MARIADB
-v /home/chchang/Downloads/mailbox-2.7.1/workdir:/workdir
-e "mailbox_ses_key=xxx"
-e "mailbox_ses_token=xxx"
-e "mailbox_ses_sender=xxx"
-e "mailbox_ses_replyto=xxx"
-e "mailbox_web_site=xxx"
toomore/mailbox:cmd
Unable to find image 'toomore/mailbox:cmd' locally
docker: Error response from daemon: pull access denied for toomore/mailbox, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
make: [Makefile:63:run_cmd] 錯誤 125 (已忽略)

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.