Try the sample code here.
Read the blog post about this sample code here.
A contact form with Azure Functions and Azure Communication Services.