eladnava/mailgen

feature request: provide raw text version

alessioalex opened this issue · 3 comments

It would be nice to also provide a raw text version of the generated mail, so that the users don't have to do that theirselves.

@alessioalex this is a great idea!

How will we return the textual version though? The package currently only returns the HTML template. We'd need to modify it to return an object, right? Or do you have another idea?

If so, it will be a breaking change and we'd need to version it accordingly.

I guess we could provide a .generateRawText() version as well that takes the same options, which would only output text. That way it would be minor semver change, without affecting the current in-use API.

@alessioalex Done!

Check out the docs:
https://github.com/eladnava/mailgen#plaintext-e-mails

Thanks again for suggesting this!