I have a dockerised web app deployed on GAE wriiten in Go. The payment module uses stripe checkout API and on success triggers an email notification.
On debugging, I observe that the following line of code is not executed. I have tried port 587 and the result is the same.
err := smtp.SendMail("smtp.gmail.com:465", auth, from, []string{to}, []byte(msg))
I have the same app on my local m/c and this feature works on it. Am not using docker on my local m/c though.
I am using the same user credentials as my GAE account in the 'from' user fields. Could that be the reason that the code fails. Or should the smtp service auth parameters along with the port to be exposed be described in the dockerfile. What would be the correct way to map port 465 or 587 in GAE given that only 4 ports are available? I am using Golang image 1.7.1
docker logs doesn't show any errors. But the email doesn't get sent.
etc/resolv.conf of the container has the following DNS entries
search c.cloud-devshell-prod.internal. google.internal.
nameserver 169.254.169.254
options: ndots5
Would appreciate any suggestions..
Thanks
Followed instructions on the link
https://cloud.google.com/appengine/docs/flexible/go/sending-emails-with-mailgun
Set up and account with mailgun and got it to work. Mails get sent after running docker.