Java 使用iCal4j的iCal中的HTML

Java 使用iCal4j的iCal中的HTML,java,outlook,outlook-2007,icalendar,vcalendar,Java,Outlook,Outlook 2007,Icalendar,Vcalendar,是否有可能将html添加到vevent的描述中 我生成一个VCALENDAR,其中包含一个VEVENT,其中包含一个描述。我用ICS 这就是我试图做的: BEGIN:VCALENDAR PRODID:-//----//Calendar 1.0//ES VERSION:2.0 METHOD:REQUEST CALSCALE:GREGORIAN BEGIN:VEVENT DTSTAMP:20101202T145512Z UID:20101202T145513Z-project@myPc DESCRI

是否有可能将html添加到vevent的描述中

我生成一个
VCALENDAR
,其中包含一个
VEVENT
,其中包含一个描述。我用
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>
我错过了一个部分还是不可能

编辑-我如何使用iCal4j(使用Altrep)


但是有了上面的代码,我就被卡住了。有人建议将HTML与iCall4j结合使用查看iCalendar规范,您似乎需要一种“替代文本表示法”,请参见

例如:

   DESCRIPTION;ALTREP="CID:part3.msg.970415T083000@example.com":
    Project XYZ Review Meeting will include the following agenda
     items: (a) Market Overview\, (b) Finances\, (c) Project Man
    agement
“ALTREP”属性参数值可能指向“text/html” 内容部分

   Content-Type:text/html
   Content-Id:<part3.msg.970415T083000@example.com>

   <html>
     <head>
      <title></title>
     </head>
     <body>
       <p>
         <b>Project XYZ Review Meeting</b> will include
         the following agenda items:
         <ol>
           <li>Market Overview</li>
           <li>Finances</li>
           <li>Project Management</li>
         </ol>
       </p>
     </body>
   </html>
内容类型:文本/html
内容Id:

项目XYZ审查会议将包括
下列议程项目:
  • 市场概况
  • 财政
  • 项目管理

  • 我在这里找到了解决方案:


    以正确的方式使用多部分解决了问题

    mm我需要对此进行研究,但似乎必须参考您电子邮件的其他内容部分。。。在转义后,我得到一个错误,如:'.URISyntaxException:索引0处方案名称中的非法字符:“…相同的错误:.URISyntaxException:索引0处方案名称中的非法字符:p是否引发异常?您将URI设置为什么?
       DESCRIPTION;ALTREP="CID:part3.msg.970415T083000@example.com":
        Project XYZ Review Meeting will include the following agenda
         items: (a) Market Overview\, (b) Finances\, (c) Project Man
        agement
    
       Content-Type:text/html
       Content-Id:<part3.msg.970415T083000@example.com>
    
       <html>
         <head>
          <title></title>
         </head>
         <body>
           <p>
             <b>Project XYZ Review Meeting</b> will include
             the following agenda items:
             <ol>
               <li>Market Overview</li>
               <li>Finances</li>
               <li>Project Management</li>
             </ol>
           </p>
         </body>
       </html>