Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
SendGrid Template Engine 奮闘記
Search
Shogo Kawahara
March 28, 2017
Programming
0
340
SendGrid Template Engine 奮闘記
SendGrid Night #7 でのLT資料です
https://eventdots.jp/event/615303
Shogo Kawahara
March 28, 2017
Tweet
Share
More Decks by Shogo Kawahara
See All by Shogo Kawahara
Rubyで音声「データ」を作る
kawahara
0
11
データベースだけじゃないN+1とその対策
kawahara
0
870
CoderDojo 千葉県総武線沿線の取り組み
kawahara
1
400
Other Decks in Programming
See All in Programming
Honoアップデート 2025年夏
yusukebe
1
860
レガシープロジェクトで最大限AIの恩恵を受けられるようClaude Codeを利用する
tk1351
3
1.3k
Understanding Ruby Grammar Through Conflicts
yui_knk
1
140
あなたとJIT, 今すぐアセンブ ル
sisshiki1969
1
730
ECS初心者の仲間 – TUIツール「e1s」の紹介
keidarcy
0
100
Google I/O recap web編 大分Web祭り2025
kponda
0
2.9k
『リコリス・リコイル』に学ぶ!! 〜キャリア戦略における計画的偶発性理論と変わる勇気の重要性〜
wanko_it
1
600
MLH State of the League: 2026 Season
theycallmeswift
0
160
Kiroの仕様駆動開発から見えてきたAIコーディングとの正しい付き合い方
clshinji
1
150
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
190
オープンセミナー2025@広島「君はどこで動かすか?」アンケート結果
satoshi256kbyte
0
210
tool ディレクティブを導入してみた感想
sgash708
1
150
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.6k
BBQ
matthewcrist
89
9.8k
Designing for Performance
lara
610
69k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
How to Think Like a Performance Engineer
csswizardry
25
1.8k
Scaling GitHub
holman
462
140k
The Language of Interfaces
destraynor
160
25k
Designing for humans not robots
tammielis
253
25k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Why Our Code Smells
bkeepers
PRO
338
57k
Building Adaptive Systems
keathley
43
2.7k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
Transcript
4FOE(SJE5FNQMBUF &OHJOFฃಆه 4IPHP,BXBIBSBTIPHPLBXBIBSB!DPEFBMBTJB 4FOE(SJE/JHIUWPM
ݪͰ͢ w ίσΞϧגࣜձࣾ$50 w LBXBIBSB w PPIBSBCVDZPV w 3VCZ 3VCZPO3BJMTͱ
Ұॹʹ4FOE(SJE׆༻த
4FOE(SJEઈࢍ׆༻த ϦϞʔτՄͷ෭ۀϑϦʔϥϯε Ҋ݅Λܝࡌͨ͠ ϫʔΩϯάϦΫϧʔςΟϯάαʔϏε IUUQTXXXDPEFBMXPSL Ԡืϝοηʔδͷར༻ͳͲ ٻ৬ऀ༷࠾༻୲ऀ༷ ϝʔϧૹ৴ "1*W #PVODF#MPDLใͳͲ
$VTUPNFS4VQQPSU 5FBN .BSLFUJOH&NBJM ʹΑΔϝϧϚΨͷൃߦӦۀ
4FOE(SJE5FNQMBUF&OHJOFͬͯ·͢ 4FOE(SJE5FNQMBUF&OHJOFJT"XFTPNF
4FOE(SJE5FNQMBUF&OHJOF ͬͯ·͍ͨͭ͠࠷ۙ·Ͱ #VU XFEPO`UVTFJUBOZNPSF8IZ
4FOE(SJE5FNQMBUF&OHJOF ͱ BMXPSL Ԡืϝοηʔδͷར༻ͳͲ ٻ৬ऀ༷࠾༻୲ऀ༷ ϝʔϧૹ৴ "1*W #PVODF#MPDLใͳͲ $VTUPNFS4VQQPSU 5FBN
.BSLFUJOH&NBJM -FHBDZ ʹΑΔϝϧϚΨͷൃߦӦۀ ֤छϝʔϧͷςϯϓϨʔτͷཧ .BOBHJOH5FNQMBUF&OHJOF ͷߏ
ར༻͢ΔϝϦοτ w ϝʔϧςϯϓϨʔτػೳΛ4FOE(SJEଆ͕ఏڙͯ͠ ͘ΕΔ w ΩϟϯϖʔϯใͳͲΛ$VTUPNFS4VQQPSU 5FBN͕։ൃνʔϜͷखΛΘͣʹૠೖ͢Δ͜ͱ ͕Ͱ͖Δ
4FOE(SJE5FNQMBUF&OHJOF ؆୯ͳ͍ํ ςϯϓϨʔτΛ࡞͠·͢
4FOE(SJE5FNQMBUF&OHJOF ؆୯ͳ͍ํ όʔδϣϯΛ࡞͠·͢
4FOE(SJE5FNQMBUF&OHJOF ؆୯ͳ͍ํ
4FOE(SJE5FNQMBUF&OHJOF ؆୯ͳ͍ํ
w (FNTͷՃ w TFOEHSJESVCZ σϞͰWܥΛར༻ w W࣌ʹൺੲʹ͘Β͍ͯ͘͢ͳ͍ͬͯ Δؾ͕͠·͢Α TFOEHSJESVCZWJT
CFUUFSUIBOPMEPOF 4FOE(SJE5FNQMBUF&OHJOF ؆୯ͳ͍ํ XJUI3VCZ4%,
4FOE(SJE5FNQMBUF&OHJOF ؆୯ͳ͍ํ XJUI3VCZ4%, require 'sendgrid-ruby' personalization = SendGrid::Personalization.new personalization.to =
SendGrid::Email.new(email: '
[email protected]
') personalization.substitutions = SendGrid::Substitution.new(key: '-username-', value: 'ݪ') mail = SendGrid::Mail.new mail.from = SendGrid::Email.new(email: '
[email protected]
') mail.personalizations = personalization mail.template_id = '9c4878c0-0f94-4f8d-ae6b-2b86b499a1aa' sg = SendGrid::API.new(api_key: ENV['SENDGRID_API_KEY']) response = sg.client.mail._('send').post(request_body: mail.to_json)
%&.05*.& w ޭͨ͠Βഥखͱ͔͍ͩ͘͞
ͬͯΘ͔ͬͨσϝϦοτ ɾҙͳͲ w TVCTUJUVUJPOUBHT w )5.-&TDBQFΛߦͬͯ͘Εͳ͍ɻIUNMUFYUڞ௨ Ͱར༻͞ΕΔͷͰɺͱΓ͋͑ͣΤεέʔϓ͖͢จ ࣈΛল͘ॲཧΛߦͬͨ w ςϯϓϨʔτػೳͷͰͳ͍͚Ͳɻɻɻ
w IUUQTTFOEHSJEDPNEPDT"1*@3FGFSFODF 4.51@"1*TVCTUJUVUJPO@UBHTIUNM
ͬͯΘ͔ͬͨσϝϦοτ ɾҙͳͲ w ςϯϓϨʔτ͕૿͑Δͱཧͮ͠Β͍αʔϏε ։࢝ॳظݸҎԼ࠷ۙݸҎ্ w λάͱ͔Ͱݕࡧ͕͋ͬͨΒΑ͔ͬͨͳ͊ w $VTUPNFS4VQQPSUνʔϜ͕ςϯϓϨʔτཧ ͖͠Εͳ͘ͳͬͯ͠·ͬͨɻ
ͬͯΘ͔ͬͨσϝϦοτ ɾҙͳͲ w ຊ൪εςʔδϯάڥͳͲɺෳڥͰͷςϯ ϓϨʔτཧ͕Ͱ͖ͳ͍ υΩϡϝϯτݟΔݶΓ BDUJWFͳͷ͕ૹΒΕͯ͠·͏ εςʔδϯάς ετͱ͔Ͳ͏͢ΔͶʔΜ$4νʔϜ͕͜͜ͰΑ͘ ࣄނͬͨɻ
ͬͯΘ͔ͬͨσϝϦοτ ɾҙͳͲ w ຊ൪εςʔδϯάڥͳͲɺෳڥͰͷςϯ ϓϨʔτཧ͕Ͱ͖ͳ͍ υΩϡϝϯτݟΔݶΓ BDUJWFͳͷ͕ૹΒΕͯ͠·͏ εςʔδϯάς ετͱ͔Ͳ͏͢ΔͶʔΜ$4νʔϜ͕͜͜ͰΑ͘ ࣄނͬͨɻ
αϙʔτᐌ͘ ʮ4VC6TFS͚ͬͯΔ͖ʯ ͱͷ͜ͱͰͨ͠
࠷ऴతʹ w ྲྀੴʹऩू͔ͭͳ͘ͳ͖ͬͯͨ w ڞ௨෦ݸผ෦ͳͲͷϢʔεέʔεΛੳͯ͠ɺͪΌΜ ͱࣗͨͪͷۀʹ߹͏ςϯϓϨʔτΤϯδϯ࡞Γ·ͨ͠
4FOE(SJE5FNQMBUF&NBJM ͜Μͳ࣌ʹΦεεϝ w ςϯϓϨʔτύλʔϯ͕ͦΜͳʹଟ͘ͳ͍߹ w ։ൃͷ༨༟తʹ·ͩϝʔϧςϯϓϨʔτཧػೳΛ ࡞Εͳ͍߹