Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rails 6.0 Action Mailboxについて

Rails 6.0 Action Mailboxについて

otemachi.rb#17で発表した資料

horikawa

May 15, 2019
Tweet

More Decks by horikawa

Other Decks in Programming

Transcript

  1. Rails 6.0ͷओཁ௥Ճػೳ • Action Text • Action Mailbox • Multiple

    Databases • Parallel Testing • Zeitwerk...etc
  2. app/mailboxes/application_mailbox.rb class ApplicationMailbox < ActionMailbox::Base # [email protected]Ѽͷϝʔϧ͸ # ForwardsMailboxΫϥε಺ͰɺॲཧΛߦ͏ routing

    /^save@/i => :forwards 
 # [email protected]Ѽͷϝʔϧ͸ # RepliesMailboxΫϥε಺ͰɺॲཧΛߦ͏ routing /@replies\./i => :replies end
  3. SMTPड͚ೖΕઃఆ • config/environments/֤؀ڥ.rb
 config.action_mailbox.ingress = # ͜͜ʹαʔϏε໊ # sendgridͷ৔߹ config.action_mailbox.ingress

    = :sendgrid # mailgunͷ৔߹ config.action_mailbox.ingress = :mailgun # exam, mailgun, mandrill, postfix, postmark, qmail, sendgridΛαϙʔτ͍ͯ͠Δ
  4. ؾʹͳͬͨՕॴ • ϝʔϧαʔϏεଆͷઃఆ΋ඞཁʹͳΔ • SendGridͳΒɺInbound ParseͳͲ • Parseͷ࢓༷΋ཧղ͓͔ͯ͠ͳ͍ͱ͍͚ͳ͍ • SES͸ɺRails

    6.1͔ΒͷαϙʔτͱͳΓͦ͏ • https://github.com/rails/rails/commit/ f480cfabcd9000b5817b610e21466299025b12d2 • ެࣜඇެࣜͷυΩϡϝϯτ͕ඇৗʹগͳ͍… • ϝʔϧେྔʹདྷͨΒɺαʔόͲ͏ͳΔͷ͔ͳ…
  5. ࢀߟ • Action Mailbox gem • https://github.com/rails/actionmailbox/tree/master • Rails Guides

    • https://edgeguides.rubyonrails.org/ action_mailbox_basics.html • bagelee • https://bagelee.com/programming/ruby-on-rails/rails6- action-mailbox/