Mailer (0.10.3)

Dead-simple mailer micro-service for static websites

API Documentation

Using an AJAX request

              
fetch('https://contact.romain-clement.net/api/mail', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    email: 'john@doe.com',
    name: 'John Doe',
    subject: 'Contact',
    message: 'Hey there! Up for a coffee?',,
    public_key: '-----BEGIN PGP PUBLIC KEY BLOCK-----\n...\n-----END PGP PUBLIC KEY BLOCK-----\n',
    honeypot: ''
  })
})
              
            

Using an HTML form

              
<form action="https://contact.romain-clement.net/api/mail/form" method="POST">
  <input type="text" name="name" required >
  <input type="email" name="email" required >
  <input type="text" name="subject" required >
  <input type="text" name="message" required >
  <input type="text" name="public_key" >
  <input type="hidden" name="honeypot" >
  <input type="submit" value="Send" >
</form>