SMTP Outbound email (GSUITE) on GCP Kubernetes Engine is not working with .Net Web Application

11/9/2018

We just recently migrated our web applications from Microsoft Azure to GCP Kubernetes. Our web application was built using .NET Core (C#). For some reason, we are having problems sending emails from our C# code using SMTP and G Suite account. The send email function was working back before in Microsoft Azure, but doesn't work in Kubernetes after migrating. We already turned on less secure apps and tried doing the SMTP relay instructed here: https://support.google.com/a/answer/2956491?hl=en , but our send e-mail function still doesn't work. We've been stuck with this for a week now and we can't figured out what settings or configurations we are missing.

Note: It's working when we are testing in our local machine, only the deployed application on Kubernetes doesn't work. We tried a manual email inside the Kubernetes and it actually sent. So the problem could be between our application-kubernetes-outbound email.

Any help will be appreciated.

-- Yen
c#
gmail
google-cloud-platform
gsuite
kubernetes

0 Answers