Bonjour
je générè des fichiers ical pour envoyer des appointments. si l'utilisateur est sous outlook il recoit bien et l'ical est bien géré. par contre si l'utilisateur est sous lotus, il ne reçoit rien du tout.
le mail généré est au format mime... est la je suis perdu.
le code d'exemple que j'ai eu
Dim session As New NotesSession
Dim db As NotesDatabase
'Set db = session.Currentdatabase
Dim ws As New NotesUIWorkspace
Dim rtiBody As NotesRichTextItem
Dim subj As String, user As String
Dim icsText As String 'iCalendar text
Dim parent As NotesMIMEEntity
Dim child1 As NotesMIMEEntity
Dim child2 As NotesMIMEEntity
Dim header As NotesMIMEHeader
Dim stream As NotesStream
Set db = session.CurrentDatabase
Dim doc As New NotesDocument(db)
'Set cdoc = ws.CurrentDocument.Document
Set db = session.CurrentDatabase
user = "toto@microsoft.com"
icsText = icsText + "BEGIN:VCALENDAR"+Chr(13)+Chr(10)
icsText = icsText + "X-LOTUS-CHARSET:UTF-8"+Chr(13)+Chr(10)
icsText = icsText + "VERSION:2.0"+Chr(13)+Chr(10)
icsText = icsText + "PRODID:-//Lotus Development Corporation//NONSGML Notes 8.5.3//EN_C"+Chr(13)+Chr(10)
icsText = icsText + "METHOD:REQUEST"+Chr(13)+Chr(10)
icsText = icsText + "BEGIN:VTIMEZONE"+Chr(13)+Chr(10)
icsText = icsText + "TZID:Romance"+Chr(13)+Chr(10)
icsText = icsText + "BEGIN:STANDARD"+Chr(13)+Chr(10)
icsText = icsText + "DTSTART:19501029T020000"+Chr(13)+Chr(10)
icsText = icsText + "TZOFFSETFROM:+0200"+Chr(13)+Chr(10)
icsText = icsText + "TZOFFSETTO:+0100"+Chr(13)+Chr(10)
icsText = icsText + "RRULE:FREQ=YEARLY;BYMINUTE=0;BYHOUR=2;BYDAY=-1SU;BYMONTH=10"+Chr(13)+Chr(10)
icsText = icsText + "End:STANDARD"+Chr(13)+Chr(10)
icsText = icsText + "BEGINAYLIGHT"+Chr(13)+Chr(10)
icsText = icsText + "DTSTART:19500326T020000"+Chr(13)+Chr(10)
icsText = icsText + "TZOFFSETFROM:+0100"+Chr(13)+Chr(10)
icsText = icsText + "TZOFFSETTO:+0200"+Chr(13)+Chr(10)
icsText = icsText + "RRULE:FREQ=YEARLY;BYMINUTE=0;BYHOUR=2;BYDAY=-1SU;BYMONTH=3"+Chr(13)+Chr(10)
icsText = icsText + "EndAYLIGHT"+Chr(13)+Chr(10)
icsText = icsText + "End:VTIMEZONE"+Chr(13)+Chr(10)
icsText = icsText + "BEGIN:VEVENT"+Chr(13)+Chr(10)
icsText = icsText + {DTSTART;TZID="Romance":20150623T150000}+Chr(13)+Chr(10)
icsText = icsText + {DTEND;TZID="Romance":20150623T160000}+Chr(13)+Chr(10)
icsText = icsText + "TRANSP:OPAQUE"+Chr(13)+Chr(10)
icsText = icsText + "DTSTAMP:20150623T125456Z"+Chr(13)+Chr(10)
icsText = icsText + "SEQUENCE:0"+Chr(13)+Chr(10)
icsText = icsText + {ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED;CN="toto"}+Chr(13)+Chr(10)
icsText = icsText + " ;RSVP=False:mailto:titi@titi.com"+Chr(13)+Chr(10)
icsText = icsText + "ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=True"+Chr(13)+Chr(10)
icsText = icsText + " :mailto:toto@microsoft.com"+Chr(13)+Chr(10)
icsText = icsText + "Classublic"+Chr(13)+Chr(10)
icsText = icsText + "SUMMARY:Test fABdfdfddfffdfd"+Chr(13)+Chr(10)
icsText = icsText + {ORGANIZER;CN="toto"}+Chr(13)+Chr(10)
icsText = icsText + " :mailto:toto@toto.com"+Chr(13)+Chr(10)
icsText = icsText + "UID:21C27D99EFA8EDA1C1257E6D0046E956-Lotus_Notes_Generated"+Chr(13)+Chr(10)
icsText = icsText + "X-LOTUS-BROADCAST:False"+Chr(13)+Chr(10)
icsText = icsText + "X-LOTUS-UPDATE-SEQ:1"+Chr(13)+Chr(10)
icsText = icsText + "X-LOTUS-UPDATE-WISL:$S:1;$L:1;$B:1;$R:1;$E:1;$W:1;$O:1;$M:1"+Chr(13)+Chr(10)
icsText = icsText + "X-LOTUS-NOTESVERSION:2"+Chr(13)+Chr(10)
icsText = icsText + "X-LOTUS-NOTICETYPE:I"+Chr(13)+Chr(10)
icsText = icsText + "X-LOTUS-APPTTYPE:3"+Chr(13)+Chr(10)
icsText = icsText + "X-LOTUS-CHILD-UID:21C27D99EFA8EDA1C1257E6D0046E956"+Chr(13)+Chr(10)
icsText = icsText + "End:VEVENT"+Chr(13)+Chr(10)
icsText = icsText + "End:VCALENDAR"+Chr(13)+Chr(10)
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 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)
Partager