Contact form for sending an email using Umbraco CMS and the MVC design pattern
Model: /Models/EmailModel.cs
View (Form): /Views/Partials/Forms/Email/Email.cshtml
View (Page): /Views/Contact.cshtml
Controller: /Controllers/EmailController.cs
A newly created Gmail account is used as authentication to the Gmail SMTP server. The authentication details (i.e login details for that account) are included in version control. Better practice would be to obtain OAuth 2.0 credentials for the solution and use access tokens.
A maximum length for the input values is not enforced (limited testing shows this is particularly problematic with a long input value for the 'Name' field, with the email either not being sent or taking considerable time to reach the recipient).