# How to customize Graylog message notification subject

**URL:** https://community.graylog.org/t/how-to-customize-graylog-message-notification-subject/16122
**Category:** Graylog Central (peer support)
**Tags:** pipeline-rules
**Created:** [June 29, 2020, 4:55pm UTC](https://community.graylog.org/t/how-to-customize-graylog-message-notification-subject/16122 "2020-06-29T16:55:08Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![shoothub](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/shoothub/32/6412_2.png) [@shoothub](https://community.graylog.org/u/shoothub)
#### Post date: [July 1, 2020, 8:32am UTC](https://community.graylog.org/t/how-to-customize-graylog-message-notification-subject/16122/5 "2020-07-01T08:32:27Z")

</div>

Check my previous post, as @tmacgbay suggested:

> [@Add the event source to the subject of an email notification](https://community.graylog.org/t/add-the-event-source-to-the-subject-of-an-email-notification/12972/7):
>
> It works. If you want source field in subject, you need to use {$message.source}: ${foreach backlog message}${message.source}${end} If you want to use user field (for example: src\_ip) use {$message.fields.src\_ip} as @tmacgbay suggested: ${foreach backlog message}${message.fields.src\_ip}${end} For example I use this subject after somebody connect to switch: User ${foreach backlog message}${message.fields.username}${end} connected to switch ${foreach backlog message}${message.source}${end} f…

---

_[View the full topic](https://community.graylog.org/t/how-to-customize-graylog-message-notification-subject/16122)._
