Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 앵귤러 애니메이션
- angular button
- angular animation
- summary
- egov spring ajax 사용 예시
- angular modal
- ApexChart
- 스크롤 이벤트
- Ionic modal
- scroll
- modal
- 검색
- Angular Router
- 스크롤 이벤트 감지
- Router
- mysql if
- ajax 사용 예시
- angular route
- 셀렉트박스 커스텀
- 옵저버블
- TAILWIND
- 아이오닉 스크롤 이벤트
- prisma
- 모달
- formgroup
- 호버
- 앵귤러 모달
- Oracle LISTAGG 사용 예시
- flex-1
- route
Archives
- Today
- Total
깜놀하는 해므찌로
Node.js nodemailer 노드js 메일 전송 기본 예시 본문
반응형
SMALL
const nodemailer = require("nodemailer"); // 모듈 요청
var email = { // 발송 메일 정보
host: "sandbox.smtp.mailtrap.io",
port: 2525,
auth : {
user: "ec588e1cd23795",
pass: "a7b3f95fdecf76"
}
};
const send = async(option) => { // send 메소드 커스텀
nodemailer.createTransport(email).sendMail(option, (error, info) => {
if(error){
console.log("error!");
}else{
console.log(info);
return info.response;
}
});
}
let emailData = { // 메일 송수신자, 제목 및 내용 설정
from : "test@gmail.com",
to : "test@gmail.com",
subject : "node Js test",
text : "node"
}
send(emailData); // 발송
반응형
LIST
'IT' 카테고리의 다른 글
vue.js watch 데이터 모니터링 (0) | 2023.05.13 |
---|---|
nodeJs 서버 열기 기본 예시 / nodeJs express / nodeJs ejs (0) | 2023.05.12 |
Typesciprt 현재 지도 위치 좌표 가져오기 (0) | 2023.05.11 |
No pipe found with name 'date'. 에러 해결 (0) | 2023.05.10 |
Typescript Map 이중 활용 예시 (0) | 2023.05.10 |