従来の ASP アプリケーションから予定表の招待状を送信して、Outlook で受信する必要があります。さまざまな電子メール コンポーネント (ASPEmail、ASPMail、JMail) を使用して添付ファイル付きのメールを送信しましたが、受信時に Outlook は添付ファイルをカレンダーの招待として認識しませんが、GMail は認識します。
JMail では、添付ファイルの content-type を text/calendar に設定できますが、違いはありません。
招待はここでテストされており、正常に検証されています。
招待をインラインで実行するなど、この問題に対する解決策は何でも受け入れますが、残念ながら .NET と PHP はオプションではありません。
ここにいくつかのテスト コードがあります。JMail は、添付ファイルのコンテンツ タイプを設定できる唯一のコンポーネントでした。
set msg = Server.CreateOBject( "JMail.Message" )
set attachment = Server.CreateOBject( "JMail.Attachment" )
msg.Logging = true
msg.silent = true
msg.From = "website@userdomain.com"
msg.FromName = "Website"
msg.AddRecipient "outlook@userdomain.com", "Outlook"
msg.Subject = "Meeting"
msg.Body = "Meeting invite attached"
'although cid not needed, i could only get this to work by using cid =
cid = msg.AddAttachment (server.mappath(".\invite.ics"), false, "text/calendar")
msg.ContentType = "text/calendar"
if not msg.Send("mail.userdomain.com" ) then
Response.write "<pre>" & msg.log & "</pre>"
else
Response.write "Message sent succesfully!"
end if
メッセージのコンテンツ タイプをテキスト/カレンダーとして設定した後、添付ファイルをクリックすると、単純なテキスト ファイルではなく 16 進数として表示されるようになりました。まだ招待として認識されていません。これがそのトップです:
This is a multipart message in MIME format.
----NEXT_BM_D29EC5CD87384387A59E240A29CD74DD
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: Quoted-Printable
Meeting invite attached
----NEXT_BM_D29EC5CD87384387A59E240A29CD74DD
Content-Type: text/calendar; name="=?iso-8859-1?Q?invite=2Eics?="
Content-Transfer-Encoding: base64
Content-Description: =?iso-8859-1?Q?invite=2Eics?=
Content-Disposition: attachment; filename="=?iso-8859-1?Q?invite=2Eics?="
Content-ID: <8AB4D71598B445B88353F487644AC2F3>
ちなみにOffice Professional Plus 2013のテスト版を使っています。
GMail で受信した同様のメッセージには、次のヘッダーが表示されます。
Content-Type: text/calendar;
boundary="--NEXT_BM_675B64750B5649EAAF1A3F3D9EC69302"
Return-path: <website@userdomain.com>
This is a multipart message in MIME format.
----NEXT_BM_675B64750B5649EAAF1A3F3D9EC69302
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: Quoted-Printable
Meeting invite attached
----NEXT_BM_675B64750B5649EAAF1A3F3D9EC69302
Content-Type: text/calendar; name="=?iso-8859-1?Q?invite=2Eics?="
Content-Transfer-Encoding: base64
Content-Description: =?iso-8859-1?Q?invite=2Eics?=
Content-Disposition: attachment; filename="=?iso-8859-1?Q?invite=2Eics?="
Content-ID: <C6C87170FE7B4BC581E7EE33EE24BC71>
したがって、メッセージ タイプは確かに text/calendar に設定されていますが、メッセージのテキスト部分は text-plain に設定されています。
本文を実際の iCal データに設定し、コンテンツ タイプを text/calendar に設定したコードの修正版を使用すると、Outlook は招待状として認識せず、メッセージの件名を使用して本文を添付ファイルに変換します。ファイル名として test.ics など