Skip to Content
한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것
book

한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것

by 한선용, 이선 브라운
May 2021
Beginner to intermediate
448 pages
9h 47m
Korean
Hanbit Media, Inc.
Content preview from 한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것
193
11
이메일 전송
res.render(‘email/cart-thank-you’, { layout: null, cart: cart },
(err,html) => {
console.log(‘rendered email: ‘, html)
if(err) console.log(‘error in email template’)
mailTransport.sendMail({
from: ‘”Meadowlark Travel”: info@meadowlarktravel.com’,
to: cart.billing.email,
subject: ‘Thank You for Book your Trip with Meadowlark Travel’,
html: html,
text: htmlToFormattedText(html),
})
.then(info => {
console.log(‘sent! ‘, info)
res.render(‘cart-thank-you’, { cart: cart })
})
.catch(err => {
console.error(‘Unable to send confirmation: ‘ + err.message)
})
}
)
})
res
.
render
를 두 번 호출했습니다. 일반적으로는
res
.
render
를 한 번만 호출하며, 두 번 호
출하더라도 첫 번째 호출 결과만 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트

한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트

한성용, 이선 브라운

Publisher Resources

ISBN: 9791162244227