Hello Signoz Team. I am trying to enable SMTP for...
# support
m
Hello Signoz Team. I am trying to enable SMTP for invitations. It does not appear to work. This page seems to say it is not working and going away, but to check Github for updates, but the github link is broken. Does SMTP for invites still work, and if so, where can I find how to configure. Signoz version: v0.78.1 Helm chart: signoz-0.76.1
v
m
So, I need to set environment vars instead of configuring queryService with helm?
Is there a way to have the operator place those vars in the correct pods?
this is the only place where you need to configure
m
Thank you!
m
@Marcus Could you maybe share if the above worked for you?
s
I followed all of these steps, but no emails are received and I can't find any errors in the logs either 😕
v
s
nop! I even ssh'ed into the container to make sure that the env variables are correctly setup I looked up the code too and I can't find the point of failure either 😕
Copy code
func (s *SMTP) SendEmail(to, subject, body string) error {

	msgString := "From: " + s.From + "\r\n" +
		"To: " + to + "\r\n" +
		"Subject: " + subject + "\r\n" +
		"MIME-Version: 1.0\r\n" +
		"Content-Type: text/html; charset=UTF-8\r\n" +
		"\r\n" +
		body

	msg := []byte(msgString)

	addr := s.Host + ":" + s.Port
	if s.Password == "" || s.Username == "" {
		return smtp.SendMail(addr, nil, s.From, strings.Split(to, ","), msg)
	} else {
		auth := smtp.PlainAuth("", s.Username, s.Password, s.Host)
		return smtp.SendMail(addr, auth, s.From, strings.Split(to, ","), msg)
	}
}
v
Can you share a dump of your env? In k8s maybe the statefulset, in docker compose maybe the env
s
sure! there you go!
v
One more help, Can you send a network call screenshot when inviting someone? It should look like
invite
in the Name.
Copy code
POST /api/v1/invite
s
All I see is this
Copy code
{
  "level": "info",
  "timestamp": "2025-04-28T06:53:33.968Z",
  "logger": "<http://go.signoz.io/pkg/http/middleware|go.signoz.io/pkg/http/middleware>",
  "caller": "middleware/logging.go:88",
  "msg": "::RECEIVED-REQUEST::",
  "client.address": "10.200.11.108:57292",
  "user_agent.original": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36",
  "server.address": "",
  "server.port": "",
  "http.request.size": 0,
  "http.route": "/api/v1/invite",
  "http.response.status_code": 200,
  "http.server.request.duration": 0.000742126
}
😕
it's so weird because I use the same SMTP credentials in other servies and they work I use resend.com for SMTP sending So I suspect that the email sending is just skipped but I don't know what in the code could trigger that
@Vibhu Pandey found the fix!