I’m having trouble with structured data markup when sending emails through Mailgun’s SMTP service. I’ve created an HTML email template that includes JSON-LD schema markup for booking confirmations. The weird thing is that when I send the exact same email using Google Apps Script, the structured data works perfectly and shows up correctly. But when I use Mailgun SMTP to send it, the markup doesn’t get processed at all.
Has anyone experienced this issue before? I’m wondering if Mailgun strips out certain elements or if there’s something specific about how they handle HTML emails that breaks the structured data.
Here’s my email template with the schema markup:
<!DOCTYPE html>
<html>
<head>
<title>Booking Confirmation</title>
<meta charset="UTF-8">
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EventReservation",
"confirmationNumber": "abc123-def456-ghi789",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"@type": "Person",
"name": "John Smith"
},
"reservationFor": {
"@type": "Event",
"name": "Restaurant Booking",
"startDate": "2024-01-15T19:00:00",
"location": {
"@type": "Place",
"name": "Downtown Bistro",
"address": {
"@type": "PostalAddress",
"streetAddress": "123 Main Street, New York, NY 10001"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": "40.7128",
"longitude": "-74.0060"
}
},
"performer": "Dinner Reservation"
},
"modifyReservationUrl": "https://example.com/modify?token=abc123-def456-ghi789"
}
</script>
</head>
<body>
Your reservation has been confirmed.
</body>
</html>