Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

aki-ks/vue-ssr-mail

Repository files navigation

SSR Mail Renderer

An http server that delivers server-side rendered vue.js pages. It is intended to be used as template engine for emails.

Defining templates

Email templates are defined in a src/email/<template-name>/ directory. Each emails consists of a template for the email subject, the html-formatted and plaintext mail content. In addition, each mail must be registered in the src/email/index.js file.

Previewing templates

Templates can be previewed under the /mail/<template-name>/<subject|plain|html> routes.

If the template is requested via a post request, variables can be passed as json object in the request body. For get requests, variables can only be passed via query parameters.

The passed variables are injected/provided to the templates as json object under the name 'data'.

For production usage, rendering templates via a post request to the endpoints /mail/<template-name> and passing variables in the request body is recommended.

Start the Server

# install dependencies
npm install

# compile the templates
npm run build

# launch the express.js SSR server
npm run start

About

Server side renderer for vue.js mjml email templates

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.