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

Support add attachment into SendGrid::TemplateMailer #46

Closed
gurgelrenan opened this issue Mar 4, 2016 · 2 comments
Closed

Support add attachment into SendGrid::TemplateMailer #46

gurgelrenan opened this issue Mar 4, 2016 · 2 comments
Labels
status: help wanted requesting help from the community type: question question directed at the library

Comments

@gurgelrenan
Copy link

Hello guys.

Currently I can add a attachment into a Mail object like well described in Attachments section:
mail.add_attachment('/tmp/report.pdf', 'july_report.pdf')
Nice, I understand! My question is about this same approach but working with templates.

As described in section Working with Templates there is SendGrid::Recipient Class that supports add_substitution method, but is there a way to pass a attachment to a SendGridRecipient object? This feature could be a good ideia to a pull request?

I hope you understand my question and I really appreciate if you can help me with this.

@thinkingserious
Copy link
Contributor

Hello @gurgelrenan,

With the v2 version of our /mail/send endpoint, the attachments are sent per email: https://sendgrid.com/docs/API_Reference/Web_API/mail.html, in v3: https://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/index.html attachments can be included with a group of personalizations.

To better understand what you are trying to do, could you please provide a code snippet with the desired functionality?

Thanks!

Elmer

@thinkingserious thinkingserious added status: help wanted requesting help from the community type: question question directed at the library labels May 22, 2016
@gurgelrenan
Copy link
Author

Version 3 will solve my problem! Thanks!

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: question question directed at the library
Projects
None yet
Development

No branches or pull requests

2 participants