Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
310
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
データベースだけじゃないN+1とその対策
kawahara
0
660
CoderDojo 千葉県総武線沿線の取り組み
kawahara
1
360
Other Decks in Programming
See All in Programming
カンファレンスでLTしました / kashiwarb5
nhayato
0
100
CSC305 Lecture 23
javiergs
PRO
0
110
flutterkaigi_2024.pdf
kyoheig3
0
450
Criando Commits Incríveis no Git
marcelgsantos
1
120
React への依存を最小にするフロントエンド設計
takonda
21
8.7k
PaaSとSaaSの境目で信頼性と開発速度を両立する 〜TROCCO®︎のこれまでとこれから〜
gtnao
6
6.1k
Arm移行タイムアタック
qnighy
0
400
As an Engineers, let's build the CRM system via LINE Official Account 2.0
clonn
1
630
事業成長を爆速で進めてきたプロダクトエンジニアたちの成功談・失敗談
nealle
3
1.2k
React CompilerとFine Grained Reactivityと宣言的UIのこれから / The next chapter of declarative UI
ssssota
7
3.2k
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
3
1.5k
プロダクトの品質に コミットする / Commit to Product Quality
pekepek
1
570
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
328
21k
The Cost Of JavaScript in 2023
addyosmani
45
6.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Statistics for Hackers
jakevdp
796
220k
Designing for humans not robots
tammielis
250
25k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
A Tale of Four Properties
chriscoyier
157
23k
Typedesign – Prime Four
hannesfritz
40
2.4k
Navigating Team Friction
lara
183
15k
Code Review Best Practice
trishagee
64
17k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
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 ։ൃͷ༨༟తʹ·ͩϝʔϧςϯϓϨʔτཧػೳΛ ࡞Εͳ͍߹