diff --git a/monitors/email_ping.go b/monitors/email_ping.go index 6cf32a6..fc02a3e 100644 --- a/monitors/email_ping.go +++ b/monitors/email_ping.go @@ -293,6 +293,11 @@ func (m *emailPingMonitor) receive_email(data *emailData, shouldWaitForResponse return message, 0, errors.New(message) } } + if len(uids) == 0 { + zap.S().Debugln("IMAP no response found - not waiting") + + return "", 0, nil + } zap.S().Debugln("IMAP response found") // Fetch the reply email