댓글 검색 목록

[Nodejs] emailjs - SMTP 서버에 첨부 파일이 있는 텍스트 / HTML 이메일을 보냅니다.

페이지 정보

작성자 운영자 작성일 20-10-03 17:36 조회 967 댓글 0

node.js에서 모든 smtp 서버로 이메일, html 및 첨부 파일 (파일, 스트림 및 문자열)을 보냅니다.


https://github.com/eleith/emailjs


import { SMTPClient } from 'emailjs';

const client = new SMTPClient({
	user: 'user',
	password: 'password',
	host: 'smtp.your-email.com',
	ssl: true,
});

// send the message and get a callback with an error or details of the message that was sent
client.send(
	{
		text: 'i hope this works',
		from: 'you <username@your-email.com>',
		to: 'someone <someone@your-email.com>, another <another@your-email.com>',
		cc: 'else <else@your-email.com>',
		subject: 'testing emailjs',
	},
	(err, message) => {
		console.log(err || message);
	}
);

댓글목록 0

등록된 댓글이 없습니다.

웹학교 로고

온라인 코딩학교

코리아뉴스 2001 - , All right reserved.