# Setting same 'From Address" in Mail Notifications for all forms

**URL:** <https://community.gravityforms.com/t/setting-same-from-address-in-mail-notifications-for-all-forms/9123>\
**Category:** Get Help\
**Tags:** gravity-forms-25\
**Created:** [May 13, 2021, 4:13pm UTC](https://community.gravityforms.com/t/setting-same-from-address-in-mail-notifications-for-all-forms/9123 "2021-05-13T16:13:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![user5a1f33d24d49d3.5](https://avatars.discourse-cdn.com/v4/letter/u/9dc877/32.png) [@user5a1f33d24d49d3.5](https://community.gravityforms.com/u/user5a1f33d24d49d3.5)\
**Post date:** [May 13, 2021, 4:13pm UTC](https://community.gravityforms.com/t/setting-same-from-address-in-mail-notifications-for-all-forms/9123/1 "2021-05-13T16:13:16Z")

</div>

Hello

I want to set same “from address” on mail notifications of all the forms (in all the multisites)

Can anybody provide me the web hook or code to do that using functions.php?

Thank you  
Regards

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [May 17, 2021, 5:51am UTC](https://community.gravityforms.com/t/setting-same-from-address-in-mail-notifications-for-all-forms/9123/2 "2021-05-17T05:51:34Z")

</div>

Hello Yves. You could use the [gform\_pre\_send\_mail](https://docs.gravityforms.com/gform_pre_send_email/) filter, like this, to set the same FROM address for all forms on the site:

```auto
add_filter( 'gform_pre_send_email', 'before_email_sent', 10, 4 );
function before_email_sent( $email, $message_format, $notification, $entry ) {
    GFCommon::log_debug( __METHOD__. '(): EMAIL BEFORE => ' . print_r( $email, true ) );
    $email['headers']['From'] = 'From: ' . 'Your Name <email@website.com>';
    GFCommon::log_debug( __METHOD__. '(): EMAIL AFTER => ' . print_r( $email, true ) );
    return $email;
}

```

---

<div class="post-metadata">

**Author:** ![richardw8k](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/richardw8k/32/2354_2.png) [@richardw8k](https://community.gravityforms.com/u/richardw8k)\
**Post date:** [January 5, 2022, 8:36am UTC](https://community.gravityforms.com/t/setting-same-from-address-in-mail-notifications-for-all-forms/9123/3 "2022-01-05T08:36:14Z")

</div>


