이메일링 서비스 구현을 위해서
nodemailer 와 mailgun 을 알게 되었다.
nodemailer는
"Nodemailer is a module for Node.js applications to allow easy as cake email sending. "
Nodemailer는 케이크처럼 쉽게 이메일을 보낼 수 있도록 하는 Node.js 애플리케이션용 모듈입니다
Nodemailer :: Nodemailer
Nodemailer Nodemailer is a module for Node.js applications to allow easy as cake email sending. The project got started back in 2010 when there was no sane option to send email messages, today it is the solution most Node.js users turn to by default. npm i
nodemailer.com
mailgun
이메일전송 서비스 제공해주는 사이트
Transactional Email API Service For Developers | Mailgun
Powerful Transactional Email APIs that enable you to send, receive, and track emails, built with developers in mind. Learn more today!
www.mailgun.com
In short, SMTP is an open and established protocol with large ecosystem, while Mailgun API is better long term performance and maintenance wise.
요컨대, SMTP는 대규모 에코시스템을 갖춘 개방적이고 확립된 프로토콜인 반면 Mailgun API는 장기적 성능과 유지 관리 측면에서 더 좋습니다.
SMTP란? (Simple Mail Transfer Protocol)
전자 메일 전송을 위한 표준 프로토콜이다.
이메일을 송수신하는 서버가 SMTP서버라고 한다.
nodemailer가 SMTP를 사용한다. 그리고 mailgun에서도 smtp를 사용할 수 있다고 한다.
https://next-auth.js.org/providers/email
Email | NextAuth.js
Overview
next-auth.js.org
nextauth 자체 기능을 사용해서 진행했다
signin 시에 provider에서 해당 email있는지 확인하는 로직으로 넘어간다
혼자서 따로 구현해봐야겠다...