Reputation: 1807
I am trying to send an email with an calendar invitation from my system. I am using Nodemailer with AWS SES to send the email. However, when I receive the email, it is not recognized in Outlook or Apple Mail as it normally should. Instead the file is shown as an attachment like below. It works perfectly for Gmail.
My full mime email.
Date: Mon, 18 Nov 2019 21:59:06 +0100
Subject: =?UTF-8?B?TcO4dGU=?= invitasjon
From: Vemund Eldegard <[email protected]>
To: Vemund Eldegard <[email protected]>
Message-ID: <0102016e804fd836-90cd9a6a-53e9-4a45-978e-44665ed374ca-000000@eu-west-1.amazonses.com>
Thread-Topic: =?UTF-8?B?TcO4dGU=?= invitasjon
Thread-Index: ATBkLTZmODLXtNTivl08U1EZEEpJkw==
Mime-version: 1.0
Content-type: multipart/mixed;
boundary="B_3656959371_1438576101"
> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--B_3656959371_1438576101
Content-type: multipart/alternative;
boundary="B_3656959371_1431796008"
--B_3656959371_1431796008
Content-type: text/plain;
charset="UTF-8"
Content-transfer-encoding: 7bit
hallo!
--B_3656959371_1431796008
Content-type: text/html;
charset="UTF-8"
Content-transfer-encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8">
<meta content=3D"text/html; charset=3Diso-8859-1">
</head>
<body>
<p>hallo!</p>
</body>
</html>
--B_3656959371_1431796008--
--B_3656959371_1438576101
Content-type: application/ics; name="invitation.ics";
x-mac-creator="4F50494D"
Content-ID: <88C14204654B324DA95BD8F0C0925135@1>
Content-disposition: attachment;
filename="invitation.ics"
Content-transfer-encoding: base64
QkVHSU46VkNBTEVOREFSDQpWRVJTSU9OOjIuMA0KUFJPRElEOi0vL3NhbGlyZS5uby8vc2Fs
aXJlLy9FTg0KTUVUSE9EOlJFUVVFU1QNCk5BTUU6TXkgVGVzdGZlZWQNClgtV1ItQ0FMTkFN
RTpNeSBUZXN0ZmVlZA0KQkVHSU46VkVWRU5UDQpVSUQ6Zm9vMTIzQHNhbGlyZS5oZXJva3Vh
cHAuY29tDQpTRVFVRU5DRTowDQpEVFNUQU1QOjIwMTkxMTE4VDIwNTkwNloNCkRUU1RBUlQ6
MjAxOTExMThUMjA1OTA2Wg0KRFRFTkQ6MjAxOTExMThUMjE1OTA2Wg0KU1VNTUFSWTpNeSBF
dmVudA0KWC1BTFQtREVTQztGTVRUWVBFPXRleHQvaHRtbDo8Yj5tYXJrPC9iPiB1cCEgaGFo
YWgNCk9SR0FOSVpFUjtDTj0iVmVtdW5kIEVsZGVnYXJkIjtFTUFJTD12ZW11bmRAdmVtdW5k
LmRldjptYWlsdG86dmVtdW5kQHZlbXVuDQogZC5kZXYNCkFUVEVOREVFO1JPTEU9UkVRLVBB
UlRJQ0lQQU5UO0NVVFlQRT1JTkRJVklEVUFMO1BBUlRTVEFUPU5FRURTLUFDVElPTjtSU1ZQ
DQogPVRSVUU7Q049IlZlbXVuZCBFbGRlZ2FyZCI7RU1BSUw9dmVtdW5kZWxkZWdhcmRAZ21h
aWwuY29tOk1BSUxUTzp2ZW11bmRlbGQNCiBlZ2FyZEBnbWFpbC5jb20NClVSTDtWQUxVRT1V
Ukk6d2hlcmVieS5jb20vdmVtdW5kDQpTVEFUVVM6Q09ORklSTUVEDQpFTkQ6VkVWRU5UDQpF
TkQ6VkNBTEVOREFS
--B_3656959371_1438576101--
The contents of the .ical:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//salire.no//salire//EN
METHOD:REQUEST
NAME:My Testfeed
X-WR-CALNAME:My Testfeed
BEGIN:VEVENT
UID:[email protected]
SEQUENCE:0
DTSTAMP:20191118T205906Z
DTSTART:20191118T205906Z
DTEND:20191118T215906Z
SUMMARY:My Event
X-ALT-DESC;FMTTYPE=text/html:<b>mark</b> up! hahah
ORGANIZER;CN="Vemund Eldegard";[email protected]:mailto:vemund@vemun
d.dev
ATTENDEE;ROLE=REQ-PARTICIPANT;CUTYPE=INDIVIDUAL;PARTSTAT=NEEDS-ACTION;RSVP
=TRUE;CN="Vemund Eldegard";[email protected]:MAILTO:vemundeld
[email protected]
URL;VALUE=URI:whereby.com/vemund
STATUS:CONFIRMED
END:VEVENT
END:VCALENDAR
What can be wrong? I have tried everything, and read every article on the internet trying to figure this out.
Upvotes: 0
Views: 876
Reputation: 365
I've faced a similar problem and solve it by rewriting a Content-Type
header from
text/calendar; charset="utf-8";
to
text/calendar; charset="utf-8"; method=REQUEST
When I've added method=REQUEST
to header, outlook started recognise my ics file as an event.
Upvotes: 0
Reputation: 66235
The outer message content type is multipart/mixed
. Outlook expects a single MIME text/calendar
part that contains the calendar data.
Upvotes: 1