MCPcopy
hub / github.com/pocketbase/pocketbase / findSendmailPath

Function findSendmailPath

tools/mailer/sendmail.go:84–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82}
83
84func findSendmailPath() (string, error) {
85 options := []string{
86 "/usr/sbin/sendmail",
87 "/usr/bin/sendmail",
88 "sendmail",
89 }
90
91 for _, option := range options {
92 path, err := exec.LookPath(option)
93 if err == nil {
94 return path, err
95 }
96 }
97
98 return "", errors.New("failed to locate a sendmail executable path")
99}

Callers 1

sendMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…