Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
mailer
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
microservices
mailer
Commits
ff04b4f2
Commit
ff04b4f2
authored
Dec 06, 2018
by
Vadym Gidulian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added README and LICENSE
parent
b1d712e8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
0 deletions
+85
-0
LICENSE
LICENSE
+21
-0
README.md
README.md
+64
-0
No files found.
LICENSE
0 → 100644
View file @
ff04b4f2
MIT License
Copyright (c) 2018 Vadym Gidulian
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
README.md
0 → 100644
View file @
ff04b4f2
# Mailer
Mailer service for sending templated emails.
## Usage
1.
Pull Docker image:
```bash
docker pull registry.git.gvia.group/microservices/mailer
```
2.
Run container:
```
bash
docker run
\
-v $PWD/templates:/app/templates:ro
\
-e SMTP_HOST=example.com
\
-e SMTP_PORT=465
\
-e SMTP_SECURE=true
\
-e SMTP_USER=mail@example.com
\
-e SMTP_PASSWORD=password
\
registry.git.gvia.group/microservices/mailer
```
or use Docker Compose:
```
yaml
version: '3'
services:
mailer:
image: registry.git.gvia.group/microservices/mailer
environment:
SMTP_HOST: example.com
SMTP_PORT: 465
SMTP_SECURE: true
SMTP_USER: mail@example.com
SMTP_PASSWORD: password
volumes:
-
./templates:/app/templates:ro
```
### Environment variables
-
`CORS_ALLOW_ORIGIN`
: Value of
`Access-Control-Allow-Origin`
header. Default:
`*`
-
`SMTP_HOST`
: SMTP server's host
-
`SMTP_PORT`
: SMTP server's port
-
`SMTP_SECURE`
: If truthy the connection will use TLS when connecting to server.
If falsy (the default) then TLS is used if server supports the STARTTLS extension.
In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false
-
`SMTP_USER`
: Username
-
`SMTP_PASSWORD`
: Password
-
`SMTP_SENDER`
: Sender's email address. Default:
`SMTP_USER`
### Templates
Templates are located in
`/app/templates`
directory. Supported template engines are:
-
[
EJS
](
https://github.com/mde/ejs
)
(
`.ejs`
files)
-
[
Handlebars
](
https://github.com/wycats/handlebars.js
)
(
`.hbs`
or
`.handlebars`
files)
-
[
Pug
](
https://github.com/pugjs/pug
)
(
`.pug`
files)
-
Plain text (all other files with or without extension)
In template engines which support includes root for absolute paths is set to
`/app/templates`
.
I.e.
`/includes/header`
will be resolved as
`/app/templates/includes/header`
.
### API
[
Swagger
](
https://generator.swagger.io?url=https%3A%2F%2Fgit.gvia.group%2Fmicroservices%2Fmailer%2Fblob%2Fmaster%2Fopenapi.yaml
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment