Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#461 메일 전송 SMTP으로 변경 #462

Merged
merged 2 commits into from
Mar 5, 2024
Merged

Conversation

withSang
Copy link
Member

@withSang withSang commented Feb 13, 2024

Summary

It closes #461
기존에 AWS SES([email protected] 계정)로 전송하는 신고 메일을 SMTP 방식([email protected])으로 전송하도록 수정합니다.

production 환경에서는 gmail로 이메일을 전송하고, development나 test 환경에서는 Ethereal 서비스를 사용해 mock 이메일을 전송합니다(nodemailer 문서 - Testing SMTP).

@DoyunShin 도움 주셔서 감사드립니다.. ❤️

Extra info

없음.

Images or Screenshots

image - mock 이메일이 Ethereal 서버로 전송되면, 이메일 미리보기 url이 로그로 기록됩니다. image
  • Ethereal 서비스를 사용한 mock 이메일 예시입니다.

Further Work

  • 없음.

@withSang withSang linked an issue Feb 13, 2024 that may be closed by this pull request
1 task
@withSang withSang requested review from chlehdwon, 14KGun and kmc7468 and removed request for chlehdwon February 13, 2024 13:38
@withSang withSang self-assigned this Feb 13, 2024
@withSang withSang added the ⚒ enhancement New feature or request label Feb 13, 2024
@withSang
Copy link
Member Author

로컬 개발환경에서 Ethereal 서비스에 접속할 때 네트워크 오류가 발생하면, 다시 시도하도록 코드를 수정하였습니다.

@DoyunShin
Copy link
Member

현 taxi prod 서버 ip주소를 gmail smtp 인증목록에 추가하였습니다.

Copy link
Member

@kmc7468 kmc7468 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오.. 작업해 주셔서 감사합니다! 사소한 요청사항 몇 개 남겼는데 확인 부탁드려요!

await this.#transporter.sendMail(mailOptions);
return true;
} catch (err) {
logger.error(err);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

메일을 보내지 못했다는 내용도 로그에 같이 남겨지면 좋을 것 같아요!

.catch((err) => {
// 네트워크 오류 등으로 mock 메일 전송을 위한 agent 객체 생성에 실패했을 때 에러를 반환합니다.
// sendMail 메서드가 다시 호출될 때 새로운 transporterPromise를 생성하기 위해 null로 초기화합니다.
logger.error("mock 메일 전송을 위한 agent 객체 생성에 실패했습니다.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

로그는 영어를 사용하는게 다른 로그와의 통일성 유지를 위해 좋을 것 같습니다!

Copy link
Contributor

@chlehdwon chlehdwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!! 개발 환경에서 미리 확인할 수 있다는 게 정말 좋은 것 같아요!!
고생하셨습니다~!~!!

Copy link
Member

@14KGun 14KGun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !!

@chlehdwon chlehdwon merged commit 345966c into dev Mar 5, 2024
1 check passed
@chlehdwon chlehdwon deleted the #461-migrate-ses-to-smtp branch March 5, 2024 17:14
@chlehdwon
Copy link
Contributor

해당 코멘트 추후 작업에서 반영하도록 하겠습니다!

@kmc7468
Copy link
Member

kmc7468 commented Mar 5, 2024

감사해요~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚒ enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

메일 전송 SMTP으로 변경
5 participants