Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

1

Simple solution of your problem: public function build() { $message = \Drupal\contact\Entity\Message::create(['contact_form' => 'feedback']); return \Drupal::service('entity.form_builder')->getForm($message); }


1

You can achieve this by overriding the service defined from Drupal core. Altering existing services, providing dynamic services describes the code to use. In your case, the code should be similar to the following one. namespace Drupal\my_module; use Drupal\Core\DependencyInjection\ContainerBuilder; use Drupal\Core\DependencyInjection\ServiceProviderBase; ...


0

I got this same error on 8.7.1 and smtp 8.x-1.0-beta4 version. Followed the steps provided in the below link will solve the issue. https://stevepolito.design/blog/drupal-configure-smtp-module-work-gmail-updated/


0

For me to get this to work, I needed to quote the tokens: FNAME: '[webform_submission:values:name]' LNAME: '[webform_submission:values:surname]'


1

First, use the -dev version of Rules. Second, always use the "Show a message on the site" action for testing. This is a LOT easier to debug than "Send email". You can use tokens in the message to test that the values are what you expect them to be, then when you get the right values you can use the email action with those same tokens in your email. Third, ...


Top 50 recent answers are included