Send an email just with the message

I have just rebuilt our graylog server from v4 to v5.2.2. We have an input of RAW UDP and our switches send their syslog messages to graylog. The messages are showing up fine in search with all the fields populated.

Now I am setting up the notifications but the old template I used on v4 is not working. The template is simple:

${foreach backlog message}
${message.message}
${end}

When I go to send a test email, it comes back saying:

Notification has email recipients and is triggered, but sending emails failed. Invalid message supplied

I have tried replacing the variable with event.message but that just shows up as empty in the email.

Where am I going wrong?

Any chance that your template is missing a new line at the end? When I copy and paste exactly what you have with no trailing new line, I get the error. When I add a newline to the end I get a success.

image

1 Like

OMG I am so stupid. Thank you, that worked great :slight_smile:

Good deal! And it’s not your fault, seems like probably a small bug on our end. I’ll create an issue to hopefully have it cleaned up so nobody else runs into this in the future!