Appointment from Notes >> Outlook 2007

This may be a simple question but somehow I don’t get it:

I need to be able to send calendar entries right into MS Outlook calendars.

I know how to create suitable entries from my app in any Notes calendar. I also know how to create iCalendar files (.ics) that can be imported into an Outlook calendar. And I also know that if I send an invitation from my Notes calendar to an Outlook user that this invitation automatically is resolved as an invitation by the Outlook client: the resulting Outlook mail already contains buttons / actions / whatever to accept or decline.

Now: if I create my iCalendar file then send it as an attachment, the recipient has to first double click on the attachment before they are asked to accept / whatever.

Question: how do I have to embed / attach / send my iCalendar info so that it is resolved automatically be the Outlook client?

Any help is highly appreciated!

-Lothar

Subject: No Answer yet?

hmm - either nobody understood what I was asking or nobody noticed my question in the first place. I’m sure there must be an answer… please!

Subject: Build Web Services

Hi ,I feel you will have to build web services. If you need more info. You can contact me on

lsushant@yahoo.com

Thanks

Sushant

Subject: you mean…

… to write the calendar entries directly into the Outlook calendars on the Exchange server or something like that? I’m afraid the customer won’t pay for the extra cost; if they do however I’d be glad to come back to your offer

Thanks meanwhile,

-Lothar

Subject: Send iCal as mime content with text/calendar type…

For example:Dim session As New NotesSession

Dim db As NotesDatabase

Set db = session.CurrentDatabase

Dim ws as New NotesUIWorkSpace

Set cdoc = ws.CurrentDocument.Document

dim rtiBody as NotesRichTextItem

Dim doc As New NotesDocument(db)

Set db = session.CurrentDatabase

dim subj As String, user As String

user = ’ “...@gmail.com

dim icsText as String 'iCalendar text

icsText = … 'set iCalendar text from your source

Dim parent As NotesMimeEntity

Dim child1 As NotesMimeEntity

Dim child2 As NotesMimeEntity

Dim header As NotesMimeHeader

Dim stream As NotesStream

session.ConvertMime = False

’ Create all the Entities - one parent, two children.

Set parent = doc.CreateMIMEEntity

Set child2 = parent.CreateChildEntity

Set child1 = parent.CreateChildEntity(child2)

’ Create so that children 1 & 2 are siblings

’ Update all the header information.

’ At this point we cannot create another “Content-Type”

’ entity on the parent, but we can update the existing value

Set header = parent.GetNthHeader(“Content-Type”)

Call header.SetHeaderValAndParams({multipart/alternative; boundary="} _

& child1.BoundaryStart & {"})

Set header = child2.CreateHeader(“Content-ID”)

Call header.SetHeaderVal(“<1” & doc.UniversalID & “>”)

’ Build the entire HTML table, including a reference _

’ to an image that is yet to come (its ID

’ was created above). This HTML goes into child 1

Set stream = session.CreateStream

Call stream.WriteText({

})

Call stream.WriteText({

})

Call stream.WriteText({<img src=cid:1} & doc.UniversalID & {>})

Call stream.WriteText({

})

Call child1.SetContentFromText(stream, “text/html”, ENC_NONE)

Call stream.Truncate

Call stream.WriteText(icsText)

Call child2.SetContentFromText(stream, “text/calendar”, ENC_NONE)

Call child2.EncodeContent(ENC_BASE64)

Call stream.Close

call doc.CloseMIMEEntities(True)

call doc.Save(true, true)

Call doc.Send( False, user)

Subject: Great stuff, thanks!

Unfortunately it’s too late now because I already had to deliver my solution.

I tested your code anyways, and in parts it works! Meaning: I can send that mail, and when I open it in Outlook or Thunderbird, the iCal-Part is there, as well as the html code. But:

  • the html including all etc. AND the iCal are displayed as plain text, so it seems to not have been rendered properly into a MIME part (or whatever that is called; MIME is not one of my strengths in knowledge, I have to admit)

  • my Outlook client regards the message as being a junk mail and automatically puts it into the appropriate folder. Something it doesn’t do if the iCal file comes as a plain attachment…

Could all this have to do with the fact that in my testing scenario I don’t have an Exchange server but am using a standard Non-Notes IMAP mail account?

I’d be happy if you had an idea what might be wrong. Although this has no priority at all at the moment…

And, just for curiosity: what’s that that you’re trying to display in the message body?

Best regards,

-Lothar