Kontakt

// Verify reCAPTCHA var recaptchaSecret = Model.Value("privateRecaptchaKey"); if (string.IsNullOrWhiteSpace(recaptchaResponse) || string.IsNullOrWhiteSpace(recaptchaSecret) || !await VerifyRecaptchaAsync(recaptchaResponse, recaptchaSecret)) { isAllSet = false; errorMessages.Add(errorMessageCaptcha); } // If validation passes, send email if (isAllSet) { try { var emailForContactForm = Model.Value("emailForContactForm") ?? "info@primesoft-group.com"; var subject = "E-Mail von Kontaktformular"; var body = $"{messageField}: {message}\n\n{nameField}: {names}"; var emailMessage = new EmailMessage( from: emailForContactForm, to: emailForContactForm, subject: subject, body: body, isBodyHtml: true ); // Send the email using IEmailSender await EmailSender.SendAsync(emailMessage, null); isSent = true; outputText = $"

{emailSentTitle}

{emailSentText}
"; } catch (Exception ex) { isAllSet = false; errorMessages.Add("An error occurred while sending your message. Please try again later. Error message: " + ex.Message); Console.WriteLine(ex.Message); } } } }

Standort Zürich

Routenplanung via Google Maps

Standort Lausanne

Routenplanung via Google Maps

Ihre Anfrage