Contact form using smtp server in hugo

Hi, I’m new to hugo and I’m very happy I knew about it.
I am selfhosting my services using yunohost. I recently moved my blog from wordpress to hugo.
I have two things I couldn’t find answers for them. The first one is the contact form that I can run from my own smtp server (or may be if there is an open source api that may be I can selfhost). I looked in the forum and I didn’t find a clear answer.
I’m using Hugo Bootstrap Theme
Thanks in advance for your help.

You don’t run a form on an SMTP server. It’s more like:

Form (html) → Form handler (api, cgi, etc.) → Message transfer agent

Instead of rolling your own, have a look at what others have done:
https://discourse.gohugo.io/search?q=contact%20form