Sending email from a kubernetes pod

5/31/2019

I’ve built a service that lives in a Docker container. As part of it’s required behavior, when receiving a gRPC request, it needs to send an email as a side effect. So imagine something like

service MyExample {
  rpc ProcessAndSendEmail(MyData) returns (MyResponse) {}
}

where there’s an additional emission (adjacent to the request/response pattern) of an email message.

On a “typical” server deployment, I might have a postfix running ; if I were using a service, I’d just dial it’s SMTP endpoint. I don’t have either readily available in this case.

As I’m placing my service in a container and would like to deploy to kubernetes, I’m wondering what solutions work best? There may be a simple postfix-like Docker image I can deploy... I just don’t know.

-- 1ijk
email
grpc
kubernetes
smtp

0 Answers