use managed attribute

This commit is contained in:
shoopea
2023-07-31 10:13:36 +02:00
parent 24a5e6676f
commit b4d27e0867
7 changed files with 130 additions and 10 deletions

View File

@@ -41,6 +41,10 @@ func (e *Email) Send() error {
log.WithFields(log.Fields{}).Debugf("starting")
defer log.WithFields(log.Fields{}).Debugf("done")
if len(e.items) == 0 {
return nil
}
body := " - " + e.items[0]
for _, item := range e.items[1:] {
body = body + "\r\n" + item