Repository navigation
feature/51-send-email-with-sendgrid-template - #92
Conversation
|
@rickr - I was having issues with the substitutions portion during testing: "substitutions" => { We will have to investigate this further. |
| @sendgrid.client.mail._("send").post(request_body: mail) | ||
| rescue => e | ||
| Rails.logger.error "Failed to send email to #{options[:to]} re: #{options[:subject]} due to: #{e}" | ||
| Rails.logger.error e.backtrace.join("\n") |
There was a problem hiding this comment.
Can we reraise the error here so we know if it fails?
There was a problem hiding this comment.
Now we just need a solution for this:
@rickr - I was having issues with the substitutions portion during testing:
"substitutions" => {
"-user_count-" => options[:user_count]
}We will have to investigate this further.
|
@rickr - this one is ready. Can you 'wont fix' the code climate issue'? |
| ], | ||
| "subject" => options[:subject], | ||
| "substitutions" => { | ||
| "-user_count-" => options[:user_count] |
There was a problem hiding this comment.
Since this requires a string can you add a .to_s to this line to make sure we always pass a string to the API?
I was having issues with the substitutions portion during testing:
"substitutions" => {
"-user_count-" => options[:user_count]
}
We will have to investigate this further.
The value for user_count needs to be a string, not an integer.
6d5668d to
4bf02cb
Compare
|
@rickr - this one is ready |
Description of changes
Creates a new method for the SendGridClient that sends a transactional email using sendgrid-ruby. This method takes a transactional_template_id and a hash of values that can be substituted into the template.
Issue Resolved
Fixes #51