Skip to contentSkip to navigationSkip to topbar

Email Contact Form with SendGrid

Created by: Twilio
  • Email
  • JavaScript
  • Quick Deploy

This app shows you how to set up an email contact form for your website. The form takes an email address, a subject, and content and builds an email that is sent via the SendGrid API.

Note that you can't use the submitted email as the from address, to send with SendGrid you must use a verified sender(link takes you to an external page) or, preferably, an email from an authenticated domain(link takes you to an external page). In this application the user submitted email is set as the "reply to" email, so that when you reply in your email client, it will be addressed to the user.

Email contact form powered by SendGrid
Report this template(link takes you to an external page)
Quick Deploy to TwilioGet CodeUse Twilio CLI
Launch and test this app in a few minutes with Quick Deploy. No server needed. Quick Deploy will automatically configure and deploy this app using Twilio Functions. Learn more about Twilio Functions(link takes you to an external page)
  1. Log in to Twilio

    Access your Twilio account to get started.

    Checking for existing account...

  2. Sendgrid Api Key

    Your SendGrid API key

  3. To Email Address

    Messages submitted through the contact form will be sent to this email address

  4. From Email Address

    Messages submitted through the contact form will be sent from this email address

  5. Click the button below to deploy your app

    This will use the details entered above to deploy your application to Twilio Functions.

    You will be able to view the application in the browser and edit it using the Functions UI.

Need some help?

We all do sometimes; code is hard. Get help now from our support team(link takes you to an external page), or lean on the wisdom of the crowd by browsing the Twilio tag(link takes you to an external page)on Stack Overflow.

Terms of servicePrivacy Policy

Copyright © 2025 Twilio Inc.