Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mail constructor should allow content to be an array (for HTML) #296

Closed
mikemaccana opened this issue Sep 16, 2016 · 2 comments
Closed

Mail constructor should allow content to be an array (for HTML) #296

mikemaccana opened this issue Sep 16, 2016 · 2 comments
Labels
status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap

Comments

@mikemaccana
Copy link

mikemaccana commented Sep 16, 2016

Issue Summary

Eg, allow this.addContent() to check for isArray() and then iterate and push each content item. Many users use both HTML and text content types and it's surprising the constructor doesn't seem to handle this.

Sendgrid for node v2 simply had text and html fields. Sendgrid v4 does surprisingly less.

@thinkingserious thinkingserious added type: community enhancement feature request not on Twilio's roadmap status: help wanted requesting help from the community labels Sep 21, 2016
@thinkingserious
Copy link
Contributor

Hi @mikemaccana,

Yes, we took a step back to decouple the library from the v2 mail send endpoint so that we can support the entire v3 web api.

For now, in your case, I would advise you to follow the kitchen sink example: https://github.com/sendgrid/sendgrid-nodejs/blob/master/examples/helpers/mail/example.js#L15

The improvement you suggest, now on our roadmap, will be implemented here: https://github.com/sendgrid/sendgrid-nodejs/tree/master/lib/helpers/mail

If you have any other suggestions or a wish list of features, we would love to hear it :)

Thanks again for taking the time to reach out to us and provide constructive feedback.

Please keep an eye on this repo as we'll be reaching out for feedback as we continue to iterate. If you have a bit more time, we would love your thoughts on this: #290

Thank you!

@thinkingserious
Copy link
Contributor

Hi @mikemaccana,

Please follow this PR for an update to this library coming soon. Your feedback would be greatly appreciated. Thanks!

With Best Regards,

Elmer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

No branches or pull requests

2 participants