diff --git a/automation/automation/expr_types.go b/automation/automation/expr_types.go index e698e2da5..39ef7cc0c 100644 --- a/automation/automation/expr_types.go +++ b/automation/automation/expr_types.go @@ -23,6 +23,8 @@ func CastToEmailMessage(val interface{}) (out *emailMessage, err error) { } return val, nil + case nil: + return &emailMessage{msg: mail.NewMessage()}, nil default: return nil, fmt.Errorf("unable to cast type %T to %T", val, out) }