Unable to submit an HTML embedded form in email from Outlook

58 Views Asked by At

I've created the following Dynamic Template on Sendgrid:

<form method="GET" action="https://MySiteAPIMURL.com/EmailFeedback">
    <input type="radio" id="Illness" name="reason" value="Illness">
    <label for="Illness">Illness</label>
    <br>
    <input type="radio" id="FamilyEmergency" name="reason" value="FamilyEmergency">
    <label for="FamilyEmergency">Family emergency</label>
    <br>
    <input type="radio" id="Other" name="reason" value="Other">
    <label for="Other">Other: </label><br>
    <textarea id="noshowreason" name="otherReason" rows="4" cols="50"></textarea>
    <input type="hidden" id="subs" name="subscription" value="{{subscription_key}}">
    <input type="hidden" id="appointmentId" name="appointmentId" value="{{appointment_id}}">
    <input type="submit" value="Submit">
</form>

I'm passing 2 hidden values to track the form inputs. 1 is subscription-key and another is appointment-id

Issue:

  1. When clicked on Submit button in Outlook, nothing happens while in Gmail and other email service providers (temp-mail, 10-minute-mail, etc), the form submits perfectly fine and I get a 200 response.

  2. If I switch the submit from <input> tag to <a> tag, the redirect works but then the hidden fields like subscription key and appointment id and radio values also aren't attached to the URL and I end up with 401 response.

  3. If I replace the <input> tag with <button> tag, then button itself doesn't render at all.

  4. Advanced CSS and JS doesn't work at all. I even tried onClick="document.forms[0].submit(); return;" but the sendgrid itself removes any JS from the template when saved.

My APIs are subscription based hence I'm passing subs-key.

My Sendgrid template looks like this:

Sendgrid Dynamic Template

How it appears on Gmail: - [Working case]

Button click works here

How it appears on Outlook: - [Issue is seen here]

The button click does nothing. Is it due to some high level organization policy?

The button click does nothing here. Is it due to some organization policy?

0

There are 0 best solutions below