google app engine - smtp sendmail in Dockerised Golang Web App in GAE doesn't work -
i have dockerised web app deployed on gae wriiten in go. payment module uses stripe checkout api , on success triggers email notification.
on debugging, observe following line of code not executed. have tried port 587 , result same.
err := smtp.sendmail("smtp.gmail.com:465", auth, from, []string{to}, []byte(msg))
i have same app on local m/c , feature works on it. not using docker on local m/c though.
i using same user credentials gae account in 'from' user fields. reason code fails. or should smtp service auth parameters along port exposed described in dockerfile. correct way map port 465 or 587 in gae given 4 ports available? using golang image 1.7.1
docker logs doesn't show errors. email doesn't sent.
etc/resolv.conf of container has following dns entries
search c.cloud-devshell-prod.internal. google.internal. nameserver 169.254.169.254 options: ndots5
would appreciate suggestions..
thanks
followed instructions on link
https://cloud.google.com/appengine/docs/flexible/go/sending-emails-with-mailgun
set , account mailgun , got work. mails sent after running docker.
Comments
Post a Comment