vevent からの説明に html を追加する可能性はありますか。
VCALENDAR
説明付きのを生成しVEVENT
ます。Ical4jを使用してメールを送信しましたICS
これは私がやろうとしていることです:
BEGIN:VCALENDAR
PRODID:-//----//Calendar 1.0//ES
VERSION:2.0
METHOD:REQUEST
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20101202T145512Z
UID:20101202T145513Z-project@myPc
DESCRIPTION:ALTREP="CID:content-id-here":BlaBla
LOCATION:Room 2
SUMMARY:Confirmation
DTSTART:20110115T180000
DTEND:20110115T184500
ATTENDEE;ROLE=REQ-PARTICIPANT:mailto:foo@bar.com
ORGANIZER;SENT-BY=EyeContact:mailto:foo@bar.com
END:VEVENT
END:VCALENDAR
Content-Type:text/html
Content-Id:content-id-here
<html>
<head>
<title></title>
</head>
<body>
<p>
<b>Example</b>
</p>
</body>
</html>
これで、HTML コードを表示するだけです。
MultiPartに入れた上記のカレンダー
message.addHeaderLine("method=REQUEST");
message.addHeaderLine("charset=UTF-8");
message.addHeaderLine("component=vevent");
message.setFrom(new InternetAddress(fromAddress));
message.addRecipient(Message.RecipientType.TO, new InternetAddress(app.getPanelist().getEmail()));
message.setSubject(subject);
Multipart mp = new MimeMultipart();
MimeBodyPart iCalAttachment = new MimeBodyPart();
iCalAttachment.setDataHandler(new DataHandler(new ByteArrayDataSource(new ByteArrayInputStream(invite), "text/calendar;method=REQUEST;charset=\"UTF-8\"")));
mp.addBodyPart(iCalAttachment);
message.setContent(mp);
私は一部を見逃していますか、それとも不可能ですか?
編集 - iCal4j でやろうとしていること (Altrep を使用)
ParameterList params = new ParameterList();
URI uri = new URI("CID:content-id-here");
params.add(new AltRep(uri));
vEvent.getProperties().add(new Description(params,_content));
しかし、上記のコードでは行き詰まっています。HTML を iCall4j と組み合わせて使用するアイデア