<label>Nombre</label>
<input type="text" name="nombre"/>
<label>Apellido</label>
<input type="text" name="apellido"/>
<label>Celular</label>
<input type="text" name="celular"/>
<label>Correo</label>
<input type="text" name="correo"/>
<label>Mensaje</label>
<textarea row="2" name="mensaje" ></textarea>
<button type="button" onclick="">Enviar</button>
Simple-Mailer has it's own repository now and has different functions and APIs now (simplemailer.loca.lt)
Free signup, unlimited emails and custom functions.
Just sign up, get your API key and embed it like this:
<script src="https://simplemailer.loca.lt/js/YOUR_API_KEY/mailer.js"></script>
Here's a new working example:
let isSent = false;
function send() {
if (!isSent) {
const value = document.querySelector("[name=email]").value;
email(value, "My name", "This is a test subject", "You can put plaintext or <b>HTML</b> here").then(function() {
isSent = true;
alert("Sent to: " + value);
}).catch(err => alert(err));
} else {
alert("Spam alert!");
}
}
<script src="https://simplemailer.loca.lt/js/S7w12OjlEOz6WprNHiO3KvwGhfLJ7OZP9e4Klh3d63cV6EldSlYtAATAzRhe6Upl2/mailer.js"></script>
<input type="email" name="email" value="test@example.com" />
<input type="button" value="Submit" onclick="send()" />
It's much better than EmailJS, because you can make your own custom function name, it's much simpler and it's completely free!