I have created a form by extending FormBase class. In form, I'm having a field called "name" where user can input his name. While submitting form, I want that submitted name convert into token so that I can use that token sending emails.
example.com/admin/config/people/accounts, here is the Drupal default configuration email forms.
What I want is to use custom form field value to be appear as a token inside drupal default email config forms.How can this be achieved?
Any help is appreciated. Thanks.