Google Cloud Functions to handle form submission
Features
- Google Captcha support (optional)
- Send Email to multiple Recipients
- Origin Control
- Form Validation
ToDo
- Slack Notification
- Google Sheet Integration
Configure
- Download
contact-form-function.zip
file fromdist
folder - Create google cloud function and upload this file.
- Set Environment variables under ' Environment variables, networking, timeouts and more' link
- Set below mentioned environment variables:
Key | Sample Value | Details |
---|---|---|
SMTP_USERNAME | 9ec87c6286ec | This can be a key or email id depends on smtp provider |
SMTP_PASSWORD | 93202702fbd5 | smtp password |
SMTP_HOST | smtp.mailgun.org | |
SMTP_PORT | 2525 | 25 or 465 or 587 or 2525 |
SMTP_FROM_NAME | yourwebsite.com | This can be your name or your website name. |
SMTP_FROM_EMAIL | no-reply@example.com | |
SMTP_FROM_SUBJECT | New contact form | This can be a fixed subject line or from subject field of your contact form |
SMTP_TO | jack@example.com,mike@example.com | comma separated email addresses of recipients |
RECAPTCHA_SECRET_KEY | Leave this blank it don't want captcha. Read more about reCaptcha | |
REQUIRED_FIELDS | name,email,message | Comma separated list of required fields |
SUCCESS_MESSAGE | Thank you, We have received your message |