From 51f532ef7787cef3add97c486ef7b8c379c0b8d8 Mon Sep 17 00:00:00 2001 From: Paul Jacobse Date: Fri, 16 Jun 2023 12:12:59 +0200 Subject: [PATCH] fix: from is now optional for templated messages --- messages.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/messages.go b/messages.go index c9f3fdaf..5df22aff 100644 --- a/messages.go +++ b/messages.go @@ -795,10 +795,6 @@ func isValid(m *Message) bool { } func (pm *plainMessage) isValid() bool { - if pm.from == "" { - return false - } - if !validateStringList(pm.cc, false) { return false } @@ -812,6 +808,10 @@ func (pm *plainMessage) isValid() bool { return true } + if pm.from == "" { + return false + } + if pm.text == "" && pm.html == "" { return false }