we have added email markup schema in the HTML body. but email markup review has rejected the same with the below error:
” Hi from the Email Markup Reviews team,
We’ve completed the review process for your item. Please pay attention to the following feedback points.
The email doesn’t meet these approval criteria:
Event is not added into Calendar automatically
In the sample email you sent the event is not added automatically to the calendar. You should see the event if you send the message to yourself as outlined with the information on this link https://developers.google.com/gmail/markup/testing-your-schema#self_testing Please refer to this link (https://developers.google.com/gmail/markup/google-calendar) for more information and also you can find more information here (https://developers.google.com/gmail/markup/reference/event-reservation).”
requiried you help to resolve this error.
email markup should get reviewed and mark should add in email`
public static MimeBodyPart createHtmlPart() throws Exception {
MimeBodyPart htmlPart = new MimeBodyPart();
// Assuming you have dynamic values
String policyNo = "POL123456778";
String billingPeriodDescription = "February 2024";
String customerName = "Rashmi";
String account_id = "POL123456778";
String customerStreetAddress = "near dfdsfd";
String customerPostalCode = "656565";
String customerAddressRegion = "ggffff";
String customerTelephone = "87485654656";
String customerEmail = "[email protected]";
String totalPaymentDue = "50.00";
String paymentDueDate = "2024-03-15T00:00:00-08:00";
String orderNumber = "POL123456778";
String paymentDue = "2024-04-16T00:00:00-08:00";
String organization_name = "BAJAJ ALLIANZ LIFE";
String payment_url ="https://la.bajajallianzlife.com/pre-login-services/pay-premium";
// Dynamic HTML generation
StringBuilder htmlBuilder = new StringBuilder();
htmlBuilder.append("<html><head>")
.append("<script type="application/ld+json">")
.append("{")
.append(""@context": "http://schema.org",")
.append(""@type": "Invoice",")
.append(""confirmationNumber": "").append(policyNo).append("",")
.append(""accountId": "").append(policyNo).append("",")
/* .append(""billingPeriod": {")
.append(""@type": "Duration",")
.append(""description": "").append(billingPeriodDescription).append(""")
.append("},")*/
.append(""customer":{")
.append(""@type": "Person",")
.append(""name":"").append(customerName).append("",")
.append(""address":{")
.append(""@type" : "PostalAddress",")
.append(""streetAddress" :"").append(customerStreetAddress).append("",")
.append(""postalCode":"").append(customerPostalCode).append("",")
.append(""addressRegion":"").append(customerAddressRegion).append(""")
.append("},")
.append(""telephone":"").append(customerTelephone).append("",")
.append(""email":"").append(customerEmail).append(""")
.append("},")
.append(""provider": {")
.append(""@type": "Organization",")
.append(""name": "").append(organization_name).append(""")
.append("},")
.append(""totalPaymentDue": {")
.append(""@type": "PriceSpecification",")
.append(""price": "").append(totalPaymentDue).append("",")
.append(""priceCurrency": "INR"")
.append("},")
.append(""paymentDueDate": "").append(paymentDueDate).append("",")
.append(""referencesOrder": {")
.append(""@type": "Order",")
.append(""orderNumber": "").append(policyNo).append(""")
.append("},")
.append(""description": "ATTENTION! PREMIUM DUE SHORTLY",")
.append(""paymentStatus": "http://schema.org/PaymentDue",")
.append(""paymentDue": "").append(paymentDue).append("",")
.append(""potentialAction": {")
.append(""@type": "ViewAction",")
.append(""url": "").append(payment_url).append("",")
.append(""name": "Pay Now"")
.append("}")
.append("}")
.append("</script>")
.append("</head><body></html>");
String htmlContent = htmlBuilder.toString();
System.out.println(htmlContent);
htmlPart.setContent(htmlContent, "text/html;");
htmlPart.setHeader("Content-Transfer-Encoding", "Base64");
return htmlPart;
}
Rashmi Dhumale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.