---
title: 'Overriding email to in contact form not working'
url: 'https://getgrav.org/forum/support/overriding-email-to-in-contact-form-not-working-t5595'
markdown: 'https://getgrav.org/forum/support/overriding-email-to-in-contact-form-not-working-t5595.md'
date: '2026-06-21'
description: "Hello, I'm relatively new to Grav and I'm trying to use multiple contact forms on my new site. So far everything works fine: the forms are displayed correctly"
---

[Support](https://getgrav.org/forum/support)

#   Overriding email to in contact form not working 

 [form](https://getgrav.org/forum/tag/form) [plugin](https://getgrav.org/forum/tag/plugin) [plugins](https://getgrav.org/forum/tag/plugins)

 Solved by Thorsten [View solution](https://getgrav.org/forum/support/overriding-email-to-in-contact-form-not-working-t5595#post-28748)

  Started by Thorsten 7 years ago · 4 replies · 1430 views    

 [7 years ago](https://getgrav.org/forum/support/overriding-email-to-in-contact-form-not-working-t5595#post-28720 "Permalink") 

Hello,

I'm relatively new to Grav and I'm trying to use multiple contact forms on my new site.
So far everything works fine: the forms are displayed correctly and emails are sent.

What I'm trying to achieve is that every contact form is sending mails to different mail-addresses. So I'm overriding the "to-address" in the process part of my form but this doesn't work. The mails are always sent to the "to-address" from the email-plugin.

Am I missing something?

Best regards,
Thorsten

 [7 years ago](https://getgrav.org/forum/support/overriding-email-to-in-contact-form-not-working-t5595#post-28721 "Permalink") 

@thorsten, According the section [Emails sent with Forms](https://github.com/getgrav/grav-plugin-email/blob/develop/README.md#emails-sent-with-forms) in the docs of the email plugin, several properties of an email can be overridden. The `to-address` you mention is not one of them, but `to` is...

From the docs:

```yaml
title: Custom form

form:
  name: custom_form
  fields:

    # Any fields you'd like to add to the form:
    # Their values may be referenced in email actions via '{{ form.value.FIELDNAME|e }}'

  process:
    email:
      subject: "[Custom form] {{ form.value.name|e }}"
      body: "{% include 'forms/data.txt.twig' %}"
      from: sender@example.com
      from_name: 'Custom sender name'
      to: recipient@example.com
      to_name: 'Custom recipient name'
      content_type: 'text/plain'
      process_markdown: true
```

To test, I copied the form definition from the [Example Contact Form](https://learn.getgrav.org/16/forms/forms/example-form) and tried the field `to` with different addresses. The emails did arrive at the correct mailboxes.

 [7 years ago](https://getgrav.org/forum/support/overriding-email-to-in-contact-form-not-working-t5595#post-28725 "Permalink") 

I tried this example too. But it doesn't work.
Mails are always sent to the default address from the default-configuration.

Can this be a theming-problem?

 [7 years ago](https://getgrav.org/forum/support/overriding-email-to-in-contact-form-not-working-t5595#post-28726 "Permalink") 

@thorsten, Easy to find out... Use a fresh install of Grav 1.6.23 + Quark and see what happens...

In my fresh install + Quark the contact form works fine.

 [7 years ago](https://getgrav.org/forum/support/overriding-email-to-in-contact-form-not-working-t5595#post-28748 "Permalink")  Solution 

So finally I discovered my mistake.
Here is my "lesson learned" if somebody else is having this problem:

After doing a fresh local install the contact form worked fine for me too. So I used this form in my original website but it stopped working again.
I started to change the original form.md file and realized that my changes didn't have any effect. Maybe it was a caching problem? So I deactivated caching but still the same.

So I started to modify my form.md file piece by piece ... still no effect. Until I finally changed the name/id of my contact and then everything worked fine.

Solution: if you have several contact forms on your site be sure to give any form an unique name/id. 😀

 👍 1 

[Log in](https://getgrav.org/login?return=%2Fforum%2Fsupport%2Foverriding-email-to-in-contact-form-not-working-t5595) to reply.

###  Suggested topics

 | Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| [retina images are shown in Admin (but not all of them)](https://getgrav.org/forum/support/retina-images-are-shown-in-admin-but-not-all-of-them-t9504)    [Support](https://getgrav.org/forum/support) · by Anna, 4 days ago |  | 1 | 83 | [3 days ago](https://getgrav.org/forum/support/retina-images-are-shown-in-admin-but-not-all-of-them-t9504 "by Anna") |
| [page.date != page.header.date, now my collection sorting is broken (bug? by design?)](https://getgrav.org/forum/support/page-date-page-header-date-now-my-collection-sorting-is-broken-bug-by-design-t9484)    [Support](https://getgrav.org/forum/support) · by Anna, 3 weeks ago |  | 1 | 259 | [3 weeks ago](https://getgrav.org/forum/support/page-date-page-header-date-now-my-collection-sorting-is-broken-bug-by-design-t9484 "by Anna") |
| [it's no possible sign in with email......](https://getgrav.org/forum/support/it-s-no-possible-sign-in-with-email-t9462)    [Support](https://getgrav.org/forum/support) · by webmasterodp, 1 month ago |  | 4 | 378 | [1 month ago](https://getgrav.org/forum/support/it-s-no-possible-sign-in-with-email-t9462 "by webmasterodp") |
| [Site stopped working overnight - 'not writeable' error](https://getgrav.org/forum/support/site-stopped-working-overnight-not-writeable-error-t9445)    [Support](https://getgrav.org/forum/support) · by nwhitfield, 1 month ago |  | 2 | 348 | [1 month ago](https://getgrav.org/forum/support/site-stopped-working-overnight-not-writeable-error-t9445 "by pamtbaau") |
| [MIgrating to 2.0](https://getgrav.org/forum/support/migrating-to-2-0-t9437)    [Support](https://getgrav.org/forum/support) · by stell, 2 months ago |  | 5 | 650 | [1 month ago](https://getgrav.org/forum/support/migrating-to-2-0-t9437 "by stell") |
