Back to Parent

get "/email/:address" do  
  from = '')
  to = "#{params['address']}")
  subject = 'test'
  content = 'text/plain', value: 'and easy to do anywhere, even with Ruby')
  mail =, subject, to, content)

  sg = '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')
  response = sg.client.mail._('send').post(request_body: mail.to_json)
  puts response.status_code
  puts response.body
  puts response.headers
Click to Expand

Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!