I'm trying to make a contact Html Page for people to contact me . I'm using EmailJs service While I'm using this code it works without put it inside a function but ...... When I put it inside the function it doesn't work !! How can I fix it ?
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@emailjs/browser@3/dist/email.min.js"></script>
<script type="text/javascript">
emailjs.init('Public_Key');
emailjs.send("Service_ID","Template_ID",{
from_name: 'abdullah',
from_email: "example@gmail.com",
message: 'Hi',
})
I filled out the correct keys and ID