MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / generateMessageID

Function generateMessageID

common/email.go:13–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11)
12
13func generateMessageID() (string, error) {
14 split := strings.Split(SMTPFrom, "@")
15 if len(split) < 2 {
16 return "", fmt.Errorf("invalid SMTP account")
17 }
18 domain := strings.Split(SMTPFrom, "@")[1]
19 return fmt.Sprintf("<%d.%s@%s>", time.Now().UnixNano(), GetRandomString(12), domain), nil
20}
21
22func SendEmail(subject string, receiver string, content string) error {
23 if SMTPFrom == "" { // for compatibility

Callers 1

SendEmailFunction · 0.85

Calls 1

GetRandomStringFunction · 0.85

Tested by

no test coverage detected