Merged
Conversation
Contributor
vnandwana
commented
Apr 23, 2024
- Added support for sending emails using AWS SES.
- Updated the README.
* Updated the README.
sbrossie
requested changes
Apr 24, 2024
|
|
||
| ## AWS SES | ||
|
|
||
| Refer to the [plugin configuration](https://docs.killbill.io/latest/email-notification-plugin#plugin_configuration) section for instructions on setting up AWS SES. No newline at end of file |
| private void sendEmailViaSES(final List<String> to, final List<String> cc, final String subject, | ||
| final String body, final SmtpProperties smtp) { | ||
|
|
||
| logger.info("Setting up AWS SES..."); |
|
|
||
| final Regions region = Regions.valueOf(awsRegion.replace("-", "_").toUpperCase()); | ||
|
|
||
| logger.info("Creating AWS SES client..."); |
|
|
||
| client.sendEmail(request); | ||
|
|
||
| logger.info("Email sent successfully"); |
Member
There was a problem hiding this comment.
- Instead of printing 2 traces, one before and one after - is there a status we could use (or exception handling) from
client.sendEmail()? - Also, the traces are not consistent - if we print
to,cc... in the first one, we should do the same in the second one. But based on point 1/ I think we could do with one trace.
Contributor
Author
There was a problem hiding this comment.
The sendEmail function returns a SendEmailResult object with only a messageId property. If this property has a value, it means the email was successfully sent. If not, an exception is thrown, which helps identify any configuration problems. I've made the logging consistent for now. Let me know if you need further adjustments. Thank you.
Contributor
Author
There was a problem hiding this comment.
@sbrossie, kindly take a look at this when you get a chance. I don't think we should handle the exception here, as the exception stack trace helps in identifying any configuration issues in the environment.
sbrossie
approved these changes
Jan 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.