세컨드스페이스 제작한 express 기반 smtp 발송
329
nodemailer를 이용한 메일발송 시스템입니다.
step 1.
docker pull yahoai/secondspace-node-smtp:latest
step 2.
create file **.env ** and insert infomation.
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_SECURE=false
MAIL_USER=
MAIL_PASS=
MAIL_SERVICE=gmail
step 3.
docker run --name secondspace-node-smtp -p 3010:3010 --env-file=.env yahoai/secondspace-node-smtp:latest
url : http://localhost:3030
method : post
content-type : application/json
{
"to": "[email protected]", // 받는 유저 이메일 - require
"from" : "[email protected]", // 보내는 유저 이메일 - require
"subject" : "제목", // 메일 제목 - require
"text" : "<h4>메일입니다.</h4>" // 메일 내용 html - require
"fromUser" : "테스트", // 보내는 유저 이름 - optional
"cc" : "[email protected]" // 참조 - optional
}
cc 와 to 는 list 형식으로 입력이 가능합니다.
{
"to": ["[email protected]","[email protected]"], // 받는 유저 이메일 - require
"from" : "[email protected]", // 보내는 유저 이메일 - require
"subject" : "제목", // 메일 제목 - require
"text" : "<h4>메일입니다.</h4>" // 메일 내용 html - require
"fromUser" : "테스트", // 보내는 유저 이름 - optional
"cc" : ["[email protected]","[email protected]"], // 참조 - optional
}
// 성공
200 : {
"status" : true,
"message" : ""
}
// JSON 형식이 아님
400 : {
"status" : false,
"message" : "Request Parse Error"
}
// require parameter 가 없음.
400 : {
"status": false,
"message": "...."
}
Content type
Image
Digest
Size
71 MB
Last updated
over 4 years ago
docker pull yahoai/secondspace-node-smtp