Score:1

How can I send more than 5 emails per hour?

zm flag

Drupal doesn't allow to send more than 5 emails per hour from a contact form.

Can this value of 5 be changed somewhere? I need to change it for testing.

Score:4
cn flag

As stated in the docs:

There are hard-coded limits to how frequently contact forms can be submitted. In Drupal 8, a special drush command provides a way to configure flood control behavior: drush cedit contact.settings This lets you change the limit and time limit after which the flood restriction resets.

You can view the default/current settings with:

drush config-get contact.settings

When you execute drush cedit contact.settings, a text editor will appear (the details depend on your settings).

It will look something like this:

default_config_hash: abcdefg
langcode: en
default_form: feedback
flood:
  limit: 5
  interval: 3600
user_default_enabled: true

Change limit under flood to be the number of attempts you want per hour (defaults to 5).

You can also change interval to adjust the number of seconds that the limit is imposed for (by default, 3600 seconds = 1 hour).

markus avatar
zm flag
The command allows me to view details but how to do I change?
cn flag
@markus It could be clearer, but it says it right there in the post: `drush cedit contact.settings`.
markus avatar
zm flag
Sorry I am in a loss, how do you suggest to edit?
cn flag
@markus Updated with an example.
markus avatar
zm flag
Crap, that requires me to use Vim (or something like Vim) which I don't know how to use. I need to use `nano`.
markus avatar
zm flag
Perhaps I can edit from GUI somehow?
cn flag
@markus Please check the docs; you can easily set the editor to whatever you want: https://www.drush.org/latest/commands/config_edit/
4uk4 avatar
cn flag
In UI you can copy the original config from admin/config/development/configuration/single/export and paste the changed config to admin/config/development/configuration/single/import.
markus avatar
zm flag
I have tried `vendor/bin/drush cedit contact.settings --editor[=nano]` but that doesn't work. I don't know how else to understand the docs.
markus avatar
zm flag
`vendor/bin/drush cedit contact.settings --editor[nano]` also didn't work.
leymannx avatar
ne flag
@markus – You can also simply export config, edit `contact.settings.yml` manually, and import config again.
id flag
Brackets in command examples are for demonstration, so it is `vendor/bin/drush cedit contact.settings --editor=nano`.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.