Template mail sender is a web application which based on javascript/nodejs. It's ready for GoogleCloud platform. Save attachments on google cloud storage. Use database as Google cloud datastore and also use redis for session & queue management.
Rendering user templates by given parameters, then send rendered template to given mail address. When sending process complate also it can be save 1 copy to imap directory.
- Google cloud platform ready (by using GoogleCloudPlatform/google-cloud-node)
- Google Cloud Datastore
- Google Cloud Storage
- Google Cloud Container
- Google Cloud Logging
- Can run as multiple instance without any config (by using same redis backend)
- Message queue processing (by using OptimalBits/bull)
- Template rendering (by using wycats/handlebars.js)
- Useful handlebars plugins for attach files on Storage or embed them. (see wiki for helpers)
attach
attach file on google cloud storagelink
returns global url for given file on google cloud storagedate
returns date string by given format (by using moment/moment)embed
embed storage file into templaterender
render storage file then embed it into templateuser_variable
returns custom user parameter
Install node packages;
npm install
Run instance by set env values
PROJECT_ID=GOOGLE_PROJECT_ID BUCKET=GOOGLE_STORAGE_BUCKET REDIS_PORT=REDIS_PORT npm start
PROJECT_ID
required Google Cloud Project IDBUCKET
required Google Cloud Storage BucketREDIS_PORT
optional Redis port default6379
REDIS_HOST
optional Redis host defaultlocalhost
GOOGLE_APPLICATION_CREDENTIALS
optional Google Cloud app auth json file locationLOG_LEVEL
optional Log level defaultinfo
(uses Google Cloud Logging in production mode)NODE_ENV
optional Production flag default null (useproduction
for production)PORT
optional Server port default3000
JWT_SECRET
optional jwt secret for validation api call
navigate to http://localhost:3000