MCPcopy
hub / github.com/daptin/daptin / fillAddressFromHeader

Method fillAddressFromHeader

server/mail_adapter.go:66–75  ·  view source on GitHub ↗
(e *mail.Envelope, headerKey string)

Source from the content-addressed store, hash-verified

64}
65
66func (s *SQLProcessor) fillAddressFromHeader(e *mail.Envelope, headerKey string) string {
67 if v, ok := e.Header[headerKey]; ok {
68 addr, err := mail.NewAddress(v[0])
69 if err != nil {
70 return ""
71 }
72 return addr.String()
73 }
74 return ""
75}
76
77// compressedData struct will be compressed using zlib when printed via fmt
78type Compressor interface {

Callers 1

DaptinSmtpDbResourceFunction · 0.95

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected