{"action":"created","issue":{"url":"https://api.github.com/repos/sendgrid/sendgrid-ruby/issues/68","repository_url":"https://api.github.com/repos/sendgrid/sendgrid-ruby","labels_url":"https://api.github.com/repos/sendgrid/sendgrid-ruby/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/sendgrid/sendgrid-ruby/issues/68/comments","events_url":"https://api.github.com/repos/sendgrid/sendgrid-ruby/issues/68/events","html_url":"https://github.com/sendgrid/sendgrid-ruby/issues/68","id":162380386,"number":68,"title":"Question about variable substitution using the Mail helper","user":{"login":"safetymonkey","id":187912,"avatar_url":"https://avatars.githubusercontent.com/u/187912?v=3","gravatar_id":"","url":"https://api.github.com/users/safetymonkey","html_url":"https://github.com/safetymonkey","followers_url":"https://api.github.com/users/safetymonkey/followers","following_url":"https://api.github.com/users/safetymonkey/following{/other_user}","gists_url":"https://api.github.com/users/safetymonkey/gists{/gist_id}","starred_url":"https://api.github.com/users/safetymonkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/safetymonkey/subscriptions","organizations_url":"https://api.github.com/users/safetymonkey/orgs","repos_url":"https://api.github.com/users/safetymonkey/repos","events_url":"https://api.github.com/users/safetymonkey/events{/privacy}","received_events_url":"https://api.github.com/users/safetymonkey/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sendgrid/sendgrid-ruby/labels/status:%20help%20wanted","name":"status: help wanted","color":"159818"},{"url":"https://api.github.com/repos/sendgrid/sendgrid-ruby/labels/type:%20question","name":"type: question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-06-27T06:11:15Z","updated_at":"2016-06-28T22:15:23Z","closed_at":"2016-06-28T21:06:32Z","body":"This is basically the same question as #58 but I'm afraid I didn't understand the answer there.\r\n\r\nI'm trying to use the Mail object in this gem to hit the Web v3 API, but I can't seem to get variable substitution working. Is my only option to use the SMTP API or am I missing something?\r\n\r\nMy template has the following included in it:  `-templatevar-`\r\n\r\nMy `mail.to_json` looks like this:\r\n`{\"from\"=>{\"email\"=>\"no-reply@mysite.com\"}, \"subject\"=>\"Trying out substitutions\", \"personalizations\"=>[{\"to\"=>[{\"email\"=>my-address@gmail.com\"}]}], \"content\"=>[{\"type\"=>\"text/html\", \"value\"=>\"A variable should go right here: -variable-\"}], \"template_id\"=>\"ZZZZZ\", \"sections\"=>{\"%variable%\"=>\"Percent sub\", \"-variable-\"=>\"Dash sub\", \"-templatevar-\"=>\"Dash sub on template var\"}}`\r\n\r\nI've been banging my head against this and feel like I'm missing something critical here. Thanks in advance for any help!"},"comment":{"url":"https://api.github.com/repos/sendgrid/sendgrid-ruby/issues/comments/229200846","html_url":"https://github.com/sendgrid/sendgrid-ruby/issues/68#issuecomment-229200846","issue_url":"https://api.github.com/repos/sendgrid/sendgrid-ruby/issues/68","id":229200846,"user":{"login":"thinkingserious","id":146695,"avatar_url":"https://avatars.githubusercontent.com/u/146695?v=3","gravatar_id":"","url":"https://api.github.com/users/thinkingserious","html_url":"https://github.com/thinkingserious","followers_url":"https://api.github.com/users/thinkingserious/followers","following_url":"https://api.github.com/users/thinkingserious/following{/other_user}","gists_url":"https://api.github.com/users/thinkingserious/gists{/gist_id}","starred_url":"https://api.github.com/users/thinkingserious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinkingserious/subscriptions","organizations_url":"https://api.github.com/users/thinkingserious/orgs","repos_url":"https://api.github.com/users/thinkingserious/repos","events_url":"https://api.github.com/users/thinkingserious/events{/privacy}","received_events_url":"https://api.github.com/users/thinkingserious/received_events","type":"User","site_admin":false},"created_at":"2016-06-28T22:15:23Z","updated_at":"2016-06-28T22:15:23Z","body":"Thanks for taking the time to share your final solution!"}}
{"actor":{"display_login":"thinkingserious"}}