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

Proposal to allow user to OTP if mailing fails in development #62

Merged
merged 1 commit into from
May 5, 2020

Conversation

kylerwsm
Copy link
Contributor

@kylerwsm kylerwsm commented May 4, 2020

Problem

In development mode, we are using nodemailer-direct-transport to mail OTPs. But it does not provide consistent mailing performance across different IP addresses. Some IPs addresses may be blacklisted from outbound mailing resulting in errors like this. In these cases, developers may not be able to proceed to the OTP and user pages without making code changes.

Since we have a default OTP for local development, and nodemailer-direct-transport is a local development only issue, I thought that creating allowing users to proceed to OTP even if mailing fails in development may be appropriate and helpful.

Solution

When there is a mail error, I added a conditional statement that checks if the environment is a development environment. If it is, the server responses with an ok status after printing some relevant warning logs.

@kylerwsm kylerwsm requested review from liangyuanruo and yong-jie May 4, 2020 16:09
@liangyuanruo liangyuanruo merged commit e1d9db3 into develop May 5, 2020
@liangyuanruo liangyuanruo deleted the dev-mail-proposal branch May 5, 2020 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants