I have created a custom form in my custom module where can the user enter details like name, email, postcode, etc. Once the user submits the form I need to send the user entered details to [email protected].

How can I achieve this functionality?


1 Answer 1


Look at Magento_Contact core module, which does almost the same.

Frontend controller: \Magento\Contact\Controller\Index\Post::execute

Mail sender service: \Magento\Contact\Model\Mail::send

  • Hi @Max,thanks for your answer. how can i add my mail address instead of admin mail. So i can know it is working fine
    – Mani
    Apr 6, 2022 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.