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 | 29 | 30 |
31 |
Tags
- 패스트캠퍼스
- 패캠챌린지
- AWS S3 버킷 삭제
- vscode
- 한 번에 끝내는 AWS 인프라 구축과 DevOps 운영 초격차 패키지 Online
- 패스트캠퍼스후기
- Avast Security
- 잔디이전
- AWS S3 계정이동
- ERR unknown command 'JSON.SET'
- 직장인인강
- putty Inactive
- nodemailer
- aws
- Window redis-cli
- elastic cache
- Redis
- gitlab 잔디옮기기
- 캐시백챌린지
- redis-cli
- Ngrinder Docker
- 환급챌린지
- Avast 구독취소
- ERR unknown command 'JSON.GET'
- redis cli
- AWS S3 migration
- RedisJSON
- 캐시백
- 직장인자기계발
- aws s3
Archives
- Today
- Total
Developing
nodemailer wrong version number 해결방법 본문
Nodemailer에서 dotenv를 설정해주는 과정에서 다음과 같은 오류가 발생하였다.
[Error: 17100:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:
] {
library: 'SSL routines',
function: 'ssl3_get_record',
reason: 'wrong version number',
code: 'ESOCKET',
command: 'CONN'
}
Stackoverflow를 통해 이것이 secure 속성과 관련되었다는 것에 대한 힌트를 얻을 수 있었다.
Node.js nodemailer error - wrong version number/invalid greeting
I have a big problem with setting up the nodemailer on my node.js server. Tried everthing I found on the internet but nothing works. The only thing that was easy to setup was the gmail service. but
stackoverflow.com
본인에게 에러가 발생한 원인은 다음과 같았다.
(기존코드)
const email = {
host:process.env.{...},
port:process.env.{...},
secure:process.env.{...},
auth : {
user: process.env.{...},
pass: process.env.{...},
},
};
(변경코드)
const email = {
host:process.env.{...},
port:process.env.{...},
secure:false,
auth : {
user: process.env.{...},
pass: process.env.{...},
},
};
nodemailer에서 port 선택지를 주는데, 465 port 일때는 true이고 나머지 포트에 대해서는 false로 지정해주어야한다.
본인의 경우 .env 에 variable = false 로 주었는데 이것을 process.env.variable로 가져갈때 온전히 false로 인식을 하지 않기 때문이라고 판단하였다.
따라서 그냥 false로 해주어 문제를 해결하였다!
'Trouble Shooting' 카테고리의 다른 글
node 'request.cookies' undefined 현상 해결방법 (0) | 2022.08.29 |
---|---|
Redis 적용시 connection failed 해결방법 (node repo) (0) | 2022.08.24 |
nodemailer Error:Missing Credentials for "PLAIN" 해결방법 (0) | 2022.08.12 |
VSCode PlantUml Preview가 안되는 현상 해결방법 (0) | 2022.08.11 |
WSL에서 chmod 명령어가 정상적으로 동작하지 않는 경우 (0) | 2022.06.01 |