cloud-build-notifiers
cloud-build-notifiers copied to clipboard
[bug] aws ses send email fail ?
Hi,
I use aws ses to send cloudbuild email ,bu in the cloud run log I can see some error:
E1210 04:12:44.669479 1 notifiers.go:449] failed to run SendNotification: failed to send email: 554 Message rejected: Email address is not verified. The following identities failed the check in region US-EAST-1: XXXXXXXXXXXXXXXX(My ses key)
But I write a easy go code to test ses send, is success.
there is My test code:
import (
"log"
"net/smtp"
)
func main() {
// Set up authentication information.
auth := smtp.PlainAuth("", "ses-key", "ses-secret", "ses-server")
// Connect to the server, authenticate, set the sender and recipient,
// and send the email all in one step.
to := []string{"[email protected]"}
msg := []byte("To: [email protected]\r\n" +
"Subject: discount Gophers!\r\n" +
"\r\n" +
"This is the email body.\r\n")
err := smtp.SendMail("server:587", auth, "[email protected]", to, msg)
if err != nil {
log.Fatal(err)
}
}
Hi Chao, Based on the way we do auth now, can you modify your notifier config at all to use the SES strings? I'm not familiar with SES myself, but setting those values Should Just Work (hopefully).
@LOZORD I already modify the notifier config and upload to gcs. It always error 554.