2018. 1. 9. 10:02ㆍInformation Technology/Node.js
이번에는 HTML을 발송해보도록 하겠습니다.
기존 [Node.js]Nodemailer 모듈 (1) – 메일보내기(TEXT)를 안보신 분은 먼저 보고 오시기 바랍니다 ^^
mailOptions에 text를 주석 처리하고 html을 아래와 같이 작성합니다.
const mailOptions = {
from: '지메일아이디@gmail.com', // sender address
to: '지메일아이디@gmail.com', // list of receivers
subject: 'Hello HTML', // Subject line
// text: 'Hello world?', // plain text body
// html body
html: '<h1>Hello HTML</h1><a href="http://www.infopub.co.kr">' +
'<img src="http://www.infopub.co.kr/pdspool/common/main_top/2016-11-02.jpg"/></p></a>',
};
그리고 다시 메일을 발송해보도록 합니다.
이미지를 클릭하면 정보문화사 홈페이지로 이동하는 것을 확인 할 수 있습니다.
Judge thyself with the judgment of sincerity, and thou will judge others with the judgment of charity.
성실함의 잣대로 스스로를 평가하라, 그리고 관대함의 잣대로 남들을 평가하라.
'Information Technology > Node.js' 카테고리의 다른 글
카카오 REST API를 활용해 나에게 카카오톡 보내기 (0) | 2018.07.18 |
---|---|
[Node.js]Nodemailer 모듈 (3) – 메일보내기(첨부파일) (0) | 2018.01.10 |
[Node.js]Nodemailer 모듈 (2) – 메일보내기(HTML) (0) | 2018.01.09 |
[Node.js]Nodemailer 모듈 (1) – 메일보내기(TEXT) (0) | 2018.01.08 |
[Node.js] Curl 커맨드 command를 Nodejs/Python/로 작성해보기 (0) | 2018.01.04 |
[Node.js] node-schedule 모듈 (2), job scheduler(배치잡) (0) | 2018.01.03 |