Advertisement
Guest User

Rails Meet notes

a guest
Feb 21st, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. ## ActionMailbox
  2. — rails 6 feature
  3. — needs ruby >= 2.5.0
  4. ## Setup
  5. — rails action_mailbox:install && rails db:migrate
  6. — pick a mail provider
  7. — setup inbound routes
  8. — generate mailbox for each route
  9. — create mailbox tables in db
  10. — put the app on heroku/ngrok/whatever (emails can’t go to localhost)
  11. — (also google ngrok man says it’s important)
  12. — set up mail forwarders and ENV variables
  13. — add one line to rails config files
  14. — route everything to your mail controller, pick the name that makes sense
  15. — rails g mailbox [name]
  16. ## what you can do with mail object
  17. — it’s a LOT (look at the docs)
  18. — store email in database by making a DB model
  19. — mail.body contains hella html boilerplate, mail.body.decoded is just the content
  20. — man demos tone analysis on email (like, checking the tone of language) (talk about how great this would be for customer service departments)
  21. — he uses IBM Watson api to analyze the tone of the emails (whoa!)
  22. — !!! important — learn tone analysis/other fun ai tricks because it’s cool and fun and not too difficult and impresses people
  23. — IBM Watson is free for the first 1000 requests
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement