Reputation: 15770
I need to put "contact us" form on a static webpage. I want to create the form myself, but I can't send emails from JavaScript. However, I can send HTTP requests. So I want to send request with all the data necessary to some service, and I want this service to send me an email.
I know SendGrid or Mandrill, but I don't want to create a gate for spammers. Obviously, if I used services like this my API-KEY would be publicly accessible in JS files. Unless it is possible to limit this services to send emails only to one address, but I couldn't find such option.
Another options are http://kontactr.com/ or http://www.emailmeform.com but they offer whole web form, and send complicated requests with some ID, which doesn't work when sent again. I.e. I can't forge working request myself. Also, Kontactr comes with captcha, which I don't want and can not remove.
Do you know any simple service I could use? I want it to be as simple as possible - just data in a request which then are sent to my email.
Upvotes: 0
Views: 97
Reputation: 1511
You can achieve this using SendGrid and Parse as outlined in this blog post: https://sendgrid.com/blog/send-email-static-websites-using-parse
Using Parse allows you to keep things like your SendGrid API key a secret.
Additionally, you can make it more spam resistant by adding a Captcha, either something you create yourself, or some of the services out there (reCaptcha, Sweetcaptcha, or others).
Upvotes: 1