Sending mail with go api

i have javascript codes i want to send mail with go gin framework do you have any idea how i can do this

index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    
</head>
<body>
    <div id="overlay">
        <form onsubmit="event.preventDefault(); validateForm()">
        <h1>Contact Us</h1>
        <label for="name"> Name:</label>
        <input type="text" id="name" placeholder="Your name">
        <small class="error"></small>
        
        <label for="email"> Email: </label>
        <input type="text" id="email" placeholder="Your email">
        <small class="error"></small>
        <label for="message">Message:</label>
        <textarea id="message" placeholder="Your message" rows="6"></textarea>
        <small class="error"></small>
        <div class="center">
            <input type="submit" value="Send Message">
            <p id="success"></p>
            </div> 
        
            
        </form>
        </div>
          
<script src="script.js"></script>
</body>
</html>

script.js

const nameInput = document.querySelector("#name");
const email = document.querySelector("#email");
const message = document.querySelector("#message");
const success = document.querySelector("#success");
const errorNodes = document.querySelectorAll(".error");
// Validate data
function validateForm() {
       
      clearMessages();
      let errorFlang=false;      

    if (nameInput.value.length < 1) {
        errorNodes[0].innerText = "lütfen adınızı girirniz";
        nameInput.classList.add("error-border");
        errorFlang=true;
    }
    if (!emailIsValid(email.value)) {
        errorNodes[1].innerText = "lütfen mail adresi giriniz";
        nameInput.classList.add("error-border");
        errorFlang=true;
    }

    if (message.value.length < 1) {
        errorNodes[2].innerText = "lütfen mesajınızı giriniz";
        message.classList.add("error-border");
        errorFlang=true;
    }
    if (!errorFlag) {
        success.innerText="başarılı";
    }
}
// Clear error / success messages
function clearMessages() {
    for (let i = 0; i < errorNodes.length; i++) {
        errorNodes[i].innerText = "";
    }
    success.innerText="";
    nameInput.classList.remove("error-border");
    email.classList.remove("error-border");
    message.classList.remove("error-border");
}

// Check if email is valid
function emailIsValid(email) {
    let pattern = /\S+@\S+\.\S+/;
    return pattern.test(email);
}

I thinks this article could be usefult, https://blog.loginradius.com/engineering/sending-emails-with-golang/