Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

300
Views
How can I capture the data from an html form, process it with azure function and send a mail?

I have a simple form made in html5 and css (the fields are "name" and "email"), I created an azure function in javascript that should be in charge of taking the form data, processing it and sending an email to the same email as the user login using sendgrid, any idea how to do it?...thank you

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

If someone runs a static website without a WebApp server or virtual machine, then to add additional functionality you would normally need dedicated infrastructure to provide. Azure Functions comes here to save us, Azure Functions are priced on execution time and are cheap compared to running a WebApp server.

Coming back to your problem, to achieve your goal you have to follow the steps mentioned below, but instead of using JavaScript function we would use .NET function as it would be simple -

  • Write a frontend with HTML5 and jQuery. Create a form along with an input type for our email address and a submit button. Use jQuery and a Ajax call to POST the email address to our Azure Function url. Check this Microsoft tips & tricks page for the sample code.

  • Create the first function, HTTP trigger function to push messages into the queue. The purpose of this function is to push email content into a queue so that when the queue trigger will happen later by another function, that function will read the content from the queue.

  • Sign up for a SendGrid account, To send email using SendGrid, we should have SendGrid API Keys. Create a free SendGrid account and create API Key from settings.

  • Create the second function, Queue trigger function to pull messages from the queue and send an email. The purpose of this function is to process queue and read content from the queue and send emails as SendGridMessage.

Check the Building a Simple Contact Form with Azure Functions, How to create an email subscription with Azure Functions - Sending Emails and this blog for more information.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!