hmmm, might be issue with Sendgrid?
# daily-digest
x
hmmm, might be issue with Sendgrid?
s
Copy code
func SendEmailViaGmail(c *Config, subject string, htmlContent string) string {
	d := gomail.NewDialer("<http://smtp.gmail.com|smtp.gmail.com>", 587, c.GmailAccount, c.GmailAppPassword)
	d.TLSConfig = &tls.Config{InsecureSkipVerify: true}

	// Send emails using d.
	m := gomail.NewMessage()
	m.SetAddressHeader("From", c.From, "Pinot Slack Email Digest")
	m.SetHeader("To", <http://c.To|c.To>)
	m.SetHeader("Subject", subject)
	m.SetBody("text/html", htmlContent)

	err := d.DialAndSend(m)
	if err != nil {
		fmt.Println("Failed to send the mail via Sendgrid:  " + err.Error())
		return "Failed to send mail via Sendgrid: " + err.Error()
	} else {
		msg := fmt.Sprintf("Daily digest successfully sent with the title: `%s`\n", DigestTitle())
		fmt.Println(msg)
		return msg
	}
}
Log is misleading lol. We try to send the mail via Google smtp server but I log it as
Failed to send the mail via Sendgrid
. Sendgrid needs to be changed to
Google SMTP
. I copied the block from another function. Anyway, it looks that the usersname & password doesn’t match
message has been deleted
So, I think that we may need to re-publish the app password for
apachepinot
account
and update those for your deployment
@User
x
yes, I changed the password and updated, but seems no luck
will give a try again