yic_email

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

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

Go to latest
Published: Oct 14, 2019 License: BSD-3-Clause Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

yourITcity

Email sender service

This service wait on the RabbitMQ queue called email.

For each message received to sent the it to smpt server. The messages must have Content type text/plain or text/html and got To and Subject header fields. The body of the message will be sent as the content of the email.

Configuration by Environment variables

    RABBITMQ_URI = "amqps://guest:guest@localhost:5672"
    EMAIL_FROM="no-reply@youritcity.io"
    MJ_APIKEY_PUBLIC="MJ_APIKEY_PUBLIC"
    MJ_APIKEY_PRIVATE="MJ_APIKEY_PRIVATE"

Mailjet Account

You' ll need to have an Mailjet account to send emails and generate API keys Go to Mailjet

Compile & run

It use go modules to handler dependancy.

    go build
    ./yic_email

Use fake email sender (print email to stdout)

    go run cmd/dev-email/main.go amqps://guest:guest@localhost:5672

Send email

    go run cmd/send/main.go guest:guest@localhost:5672 email@address.com ["Subject with space"]

Then you can write the content of the email and press Ctrl+D to send or

    go run cmd/send/main.go guest:guest@localhost:5672 email@address.com ["Subject with space"] < content_file

Documentation

Overview

Email sender, listen on RabbitMQ queue named "email" and send the email via mailjet service.

Directories

Path Synopsis
cmd
dev-email command
Fake Email sender, listen on RabbitMQ queue named "email" and print it on the standard output
Fake Email sender, listen on RabbitMQ queue named "email" and print it on the standard output
send command

Jump to

Keyboard shortcuts

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