Postal-mime - 브라우저 및 서버리스용 이메일 파싱 라이브러리
(github.com/postalsys)- 브라우저 환경(웹워커 포함) 및 서버리스 함수(Cloudflare Email Workers 처럼)에서 동작
- RFC822 이메일 메시지를 읽어서 헤더/수신자/첨부파일등의 객체로 구성된 구조체로 파싱
-
PostalMime.parse(email, options) -> Promise<ParsedEmail>
- 구조화 객체를 Promise로 리턴함
- 모든 헤더의 키/밸류
- from, sender 의 이름/이메일 주소
- deliveredTo, returnPath
- to, cc, bcc, replyTo
- messageId, inReplyTo, references
- date : 전송일자의 ISO8601 포맷
- html
- text
- 첨부파일 : 파일이름, mimeType, disposition, related(인라인 이미지일경우 true), contentId, content, encoding
- EmailEngine - IMAP/SMTP를 REST API로 접근하는 오픈소스 개발팀이 만든 것