Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
205 views
in Technique[技术] by (71.8m points)

google schemas - Gmail does not show restaurant reservation card

Email that we send to diners include json-ld schema and looks like gmail recognizes it and place reservations on a calendar. But when i get email from OpenTable I see a card that pops up at the top of email. How can we enabled the same behavior?

question from:https://stackoverflow.com/questions/65618185/gmail-does-not-show-restaurant-reservation-card

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

By adding an attachment of type text/calendar or application/ics, as below.

MIME-version: 1.0
From: "Gerard H. Pille" <[email protected]>
Message-ID: <[email protected]>
To: [email protected]
Date: Thu, 07 Jan 2021 19:55:54 +0100
Subject: Invitation: Test eVent
Content-type: multipart/mixed; boundary="Boundary_(ID_qyG4ZdjoAsiZ+Jo19dCbWQ)"


--Boundary_(ID_qyG4ZdjoAsiZ+Jo19dCbWQ)
Content-type: multipart/alternative;
 boundary="Boundary_(ID_ryU4ZdJoASiZ+Jo21dCbwA)"


--Boundary_(ID_ryU4ZdJoASiZ+Jo21dCbwA)
Content-type: text/plain; charset=UTF-8
Content-transfer-encoding: 8BIT

[email protected] has invited you to Test eVent


--Boundary_(ID_ryU4ZdJoASiZ+Jo21dCbwA)
Content-type: text/calendar; method=REQUEST; charset=UTF-8
Content-transfer-encoding: 8BIT

BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:Europe/Brussels
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20210107T185501Z
LAST-MODIFIED:20210107T185554Z
DTSTAMP:20210107T185554Z
UID:b72ed9b2-bbf9-42ce-84f9-4579af0fdb1c
SUMMARY:Test eVent
ORGANIZER;RSVP=TRUE;PARTSTAT=ACCEPTED;ROLE=CHAIR:mailto:[email protected]
ATTENDEE;RSVP=TRUE;CN=Gerard H. Pille;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTI
 CIPANT:mailto:[email protected]
DTSTART;TZID=Europe/Brussels:20210107T200000
DTEND;TZID=Europe/Brussels:20210107T210000
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR


--Boundary_(ID_ryU4ZdJoASiZ+Jo21dCbwA)--

--Boundary_(ID_qyG4ZdjoAsiZ+Jo19dCbWQ)
Content-type: application/ics; name=invite.ics
Content-transfer-encoding: 8BIT
Content-disposition: attachment; filename=invite.ics

BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:Europe/Brussels
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20210107T185501Z
LAST-MODIFIED:20210107T185554Z
DTSTAMP:20210107T185554Z
UID:b72ed9b2-bbf9-42ce-84f9-4579af0fdb1c
SUMMARY:Test eVent
ORGANIZER;RSVP=TRUE;PARTSTAT=ACCEPTED;ROLE=CHAIR:mailto:[email protected]
ATTENDEE;RSVP=TRUE;CN=Gerard H. Pille;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTI
 CIPANT:mailto:[email protected]
DTSTART;TZID=Europe/Brussels:20210107T200000
DTEND;TZID=Europe/Brussels:20210107T210000
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR


--Boundary_(ID_qyG4ZdjoAsiZ+Jo19dCbWQ)--

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...