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
Azure - Add mailer support to the Container Host helm chart #4711
Azure - Add mailer support to the Container Host helm chart #4711
Conversation
@@ -94,18 +96,19 @@ def sendgrid_handler(self, queue_message, to_addrs_to_email_messages_map): | |||
|
|||
for email_to_addrs, message in six.iteritems(to_addrs_to_email_messages_map): | |||
for to_address in email_to_addrs: | |||
message_string = base64.b64decode(message.get_payload()).decode('utf-8') |
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.
Will follow up offline about this. We should use sendgrids Mail.from_emailmessage() method and replace most of this code.
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.
It wasn't quite as easy as calling Mail.from_EmailMessage
. So, I copied that function at the bottom of this file and made some changes.
- I think SendGrid has a bug in that call which is fixed by creating a
To
object instead of anEmail
object when calling the Mail constructor. - We set a number of headers on the message object that break the SendGrid API (they are reserved keys), so I ignore those headers when copying the headers over. more info
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.
Thanks for working through all that, good stuff.
…stodian#4711) * fix email content for sendgrid * mailer support for helm chart * update sendgrid email sdk * update deployment script to read a values file * cleanup deployment script * update docs * show more helm output * fix typo
#4680
Add support for deploying c7n_mailer's docker image along with the container host through the helm chart. The mailer is deployed as a Kubernetes CronJob, and a custom cron schedule can be specified.
Other Fixes