Bi 715 Send emails from testing@blocpower.io
Created by: RujitRaval
Send emails from testing@blocpower.io(If the environment is not Prod.)
Goal: In order to declutter the outbox of the welcome email, we should use our personal emails when testing as the emails for sending.
Add this to your .env file: EMAIL_HOST=smtp.gmail.com EMAIL_PORT=587 EMAIL_USE_TLS=True EMAIL_PROD_USERNAME=welcome@blocpower.io EMAIL_PROD_PASSWORD=zdjiztpyaymeyhdb EMAIL_USERNAME=testing@blocpower.io EMAIL_PASSWORD=qgjigrfmbmjarrgd
Test: Pull and submit the survey. On your provided email ID you should get thank you email from testing@blocpower.io On dev@blocpower.io the email Test - BIS - XXXX should be from testing@blocpower.io You can also test this on dev
Issue fixed: BI-715 Don't send emails from welcome@blocpower.io in Local, Dev, and Staging
Note: I have also refactored the code to reduce the repetitive calls to the email function. Let me know if you have any questions/suggestions and/or issues running this locally.