What you're describing looks to be a use case for NodeMailer. Assumption here is that you're using Node.js as your backend. There are many options for other languages pypi-mailer being a common option for python.
Regardless, you would need to have a html form (or a default option of email)
<form action="/sendMail">
<label for="email">Email: </label><br>
<input type="text" id="email" name="email" value="Enter your email"><br>
<input type="submit" value="Submit">
</form>
<p>If you click the "Submit" button, the form-data will be send to an endpoint /sendMail".</p>
Then you would need Javascript on the front-end to actually get the object. I believe this answer is what you're looking for here.
This link explains how to actually use nodemailer to send an email.
Hope this helps!