{"action":"created","issue":{"url":"https://api.github.com/repos/etewiah/pwb-for-heroku/issues/10","repository_url":"https://api.github.com/repos/etewiah/pwb-for-heroku","labels_url":"https://api.github.com/repos/etewiah/pwb-for-heroku/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/etewiah/pwb-for-heroku/issues/10/comments","events_url":"https://api.github.com/repos/etewiah/pwb-for-heroku/issues/10/events","html_url":"https://github.com/etewiah/pwb-for-heroku/issues/10","id":315798368,"number":10,"title":"Configuring Sendgrid for heroku","user":{"login":"etewiah","id":1741198,"avatar_url":"https://avatars1.githubusercontent.com/u/1741198?v=4","gravatar_id":"","url":"https://api.github.com/users/etewiah","html_url":"https://github.com/etewiah","followers_url":"https://api.github.com/users/etewiah/followers","following_url":"https://api.github.com/users/etewiah/following{/other_user}","gists_url":"https://api.github.com/users/etewiah/gists{/gist_id}","starred_url":"https://api.github.com/users/etewiah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etewiah/subscriptions","organizations_url":"https://api.github.com/users/etewiah/orgs","repos_url":"https://api.github.com/users/etewiah/repos","events_url":"https://api.github.com/users/etewiah/events{/privacy}","received_events_url":"https://api.github.com/users/etewiah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-19T09:30:45Z","updated_at":"2018-04-19T23:03:40Z","closed_at":null,"author_association":"OWNER","body":"From @cesarem:\r\n\r\nI created a new app in heroku, provisioned sendgrid following the steps from https://app.sendgrid.com/guide/integrate/langs/ruby, also added the missing line \"sendgrid:starter\" to app.json but still not sending any mail.\r\nUsing the test script works fine:\r\nrequire 'sendgrid-ruby' include SendGrid from = Email.new(email: 'test@example.com') to = Email.new(email: 'test@example.com') subject = 'Sending with SendGrid is Fun' content = Content.new(type: 'text/plain', value: 'and easy to do anywhere, even with Ruby') mail = Mail.new(from, subject, to, content) sg = SendGrid::API.new(api_key: ENV['SENDGRID_API_KEY']) response = sg.client.mail._('send').post(request_body: mail.to_json) puts response.status_code puts response.body puts response.headers\r\nNo errors in logs, actually it seems to work fine: Pwb::EnquiryMailer#general_enquiry_targeting_agency: processed outbound mail in 1504.8ms.\r\nAny other idea?\r\nThank you."},"comment":{"url":"https://api.github.com/repos/etewiah/pwb-for-heroku/issues/comments/382906656","html_url":"https://github.com/etewiah/pwb-for-heroku/issues/10#issuecomment-382906656","issue_url":"https://api.github.com/repos/etewiah/pwb-for-heroku/issues/10","id":382906656,"user":{"login":"cesarem","id":9706985,"avatar_url":"https://avatars2.githubusercontent.com/u/9706985?v=4","gravatar_id":"","url":"https://api.github.com/users/cesarem","html_url":"https://github.com/cesarem","followers_url":"https://api.github.com/users/cesarem/followers","following_url":"https://api.github.com/users/cesarem/following{/other_user}","gists_url":"https://api.github.com/users/cesarem/gists{/gist_id}","starred_url":"https://api.github.com/users/cesarem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cesarem/subscriptions","organizations_url":"https://api.github.com/users/cesarem/orgs","repos_url":"https://api.github.com/users/cesarem/repos","events_url":"https://api.github.com/users/cesarem/events{/privacy}","received_events_url":"https://api.github.com/users/cesarem/received_events","type":"User","site_admin":false},"created_at":"2018-04-19T23:03:40Z","updated_at":"2018-04-19T23:03:40Z","author_association":"NONE","body":"Hi @etewiah, thanks for the post. Yeah, from the Heroku app works fine. Nevertheless, I'd need this to work from my VPS, and since I'm not yet a Rails developer, can you point which files should I modify in the src so I can integrate it with Sendgrid or another mailer? Thank you very much."}}
{"actor":{"display_login":"cesarem"}}