Giter Club home page Giter Club logo

email-service's People

Contributors

avesus avatar caballerog avatar gimenete avatar gowiem 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

email-service's Issues

Problem with configuration

Hi,
I have an issue with the configuration as an express router. I have all configurations in .env file but when I start the router I have following message:
error: No valid TRANSPORT set
error: TypeError: Cannot set property 'mailer' of undefined
It seems as it can't read configuration.
These are my env variables:
AWS_KEY=''
AWS_SECRET='********'
AWS_REGION=''
TEMPLATES_DIR='/my/local/path'
TRANSPORT='ses'
DEFAULT_FROM='[email protected]'
DEFAULT_LANGUAGE='en'

And this is my code to start the service:

import emailService from 'pnp-email-service';

export default function (app) {

const router = emailService.createRouter();

app.use('/api/email', router);

return router;
}

Thank you

Alessia

Add ability to include default email template values

When writing the clients for my email-service there are certain ejs template values I would like to include at the service level instead of at the client level. The main example I have right now is the hostname that the emails should link to. For example, a password reset email should link to different hostnames according to environment: localhost for dev, servicename:port for staging, productionhost.com for prod. Across my different environments I want to be able to include these values within the config or as part of a separate API call to the email-service.

Going to take a crack at this now for my project and will post a PR back if this is something you folks would like to roll in.

Add ability to add an error response override

The current error response from email-service is to include the error message in a json payload under the key error. This is useful for development, but for more advanced purposes it would be ideal to allow for customization of this error response. Specifically, the company I am working for has standardized an error response from our APIs that I'd like our running version of email-service to conform to.

I'm going to fork and put together a working example, but want to raise this issue so I can get feedback if there is a particular way you folks would like this done.

Thanks for the great service! Will report back with a PR within the next week or so.

attachments?

Hello, what if the email contain attachments? Not static files. In that case, how do you pass multiple files to this service?

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.