How to print field of block in controller?

I have contact form as block, in which I want to have field for email, so that editor can set, who will get webform submission. How to print that email in controller?

Thinking about this, but it tells “Call to undefined function controller()”

 <?php controller('default', [

   'sendemail' => $block->sendemail(),
  ] ) ?>

I don’t understand your question.

As the error says, there is no controller() function. Where are you using this piece of code? What is in your default controller.

Please state exactly what you are trying to do.