()
| 82 | } |
| 83 | |
| 84 | func 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 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…