반면 형식이 확고하다면 테스트 서비스는 불필요합니다. 헤더, 볼드/이탤릭체, 가로줄, 과하지
않은 이미지 링크만 사용한다면
HTML
이메일이 깨질 염려는 없습니다.
11.6.
노드메일러
먼저 노드메일러 패키지를 설치해야 합니다. 노드메일러는
1
.
0
으로 버전업하며 크게 달라졌으
므로 이 책의 예제를 따라 하려면
0
.
7
.
1
버전을 설치해야 합니다.
npm install
--
save nodemailer
@
0
.
7
.
1
다음에는
nodemailer
패키지를 연결하고 노드메일러 인스턴스(노드메일러 용어로는 ‘트랜스
포트’
transport
라고 합니다)를 생성합니다.
var nodemailer
=
require
('
nodemailer
');
var mailTransport
=
nodemailer
.
createTransport
('
SMTP
',{
service
:
'
Gmail
',
auth
:
{
user
:
credentials
.
gmail
.
user
,
pass
:
credentials
.
gmail
.
password
,
}
});
9
장에서 만든 인증 모듈을 쓰고 있는 게 보일 겁니다. 따라서 여러분의
credentials
.
js
파일을
업데이트해야 합니다.
module
.
exports
=
{
cookieSecret
:
'
your cookie secret goes here
',
gmail ...
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.