-
Notifications
You must be signed in to change notification settings - Fork 1
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
BI-2101 - Configure Transactional Email for Production DeltaBreed #351
Conversation
enabled direct SMTP connection to SES provided the correct authentication environment variables are present
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the .env.template files here and in bi-docker-stack should have the new envs added
|
||
private Session getSmtpHost() { | ||
Properties props = new Properties(); | ||
props.put("mail.smtp.host", smtpHostServer); | ||
props.put("mail.smtp.port", smtpHostPort); | ||
props.put("mail.debug", true); | ||
return Session.getInstance(props, null); | ||
Authenticator auth = null; | ||
if (Utilities.isNeitherNullNorEmpty(smtpLogin) && Utilities.isNeitherNullNorEmpty(smtpPassword)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could use StringUtils.isNotBlank
from apache commons if you wanted to use an existing implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Thanks for the suggestion @nickpalladino, I opened a PR on bi-docker-stack here. |
Description
Story: https://breedinginsight.atlassian.net/browse/BI-2101
This PR enables bi-api to send transactional email using SMTP provided the
EMAIL_RELAY_HOST
,EMAIL_RELAY_PORT
,EMAIL_RELAY_LOGIN
andEMAIL_RELAY_PASSWORD
are provided.I configured DKIM and DMARC records required by SES so that we can send emails from [email protected].
I added an item to the v0.10 Deploy Checklist to update the production environment variables.
If the
EMAIL_RELAY_LOGIN
andEMAIL_RELAY_PASSWORD
variables are omitted or empty, the code will continue to use SMTP without auth, which is desirable in development and non-production deployments.Background Information
Dependencies
bi-web
develop
branchTesting
Regression Testing
Feature Functional Testing
Checklist: