IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Lotus Notes Discussion :

envoi/reception de mail au format mime (ICAL)


Sujet :

Lotus Notes

  1. #1
    Membre habitué
    Homme Profil pro
    Geek
    Inscrit en
    Avril 2007
    Messages
    452
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : France

    Informations professionnelles :
    Activité : Geek

    Informations forums :
    Inscription : Avril 2007
    Messages : 452
    Points : 175
    Points
    175
    Par défaut envoi/reception de mail au format mime (ICAL)
    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)

  2. #2
    Membre habitué
    Homme Profil pro
    Geek
    Inscrit en
    Avril 2007
    Messages
    452
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : France

    Informations professionnelles :
    Activité : Geek

    Informations forums :
    Inscription : Avril 2007
    Messages : 452
    Points : 175
    Points
    175
    Par défaut
    Bon finalement ça marche bcp, mais alors bcp mieux si on colle pas de champs "Form" dans le document avant l'envoi...

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. envoi d'un mail au format HTML
    Par mariepierre dans le forum Général Conception Web
    Réponses: 12
    Dernier message: 14/01/2009, 14h55
  2. JAVAMAIL, -Lire a e-mail en format MIME
    Par pachurrito dans le forum API standards et tierces
    Réponses: 1
    Dernier message: 06/10/2007, 17h12
  3. [Mail] Envois d'e-mails au format texte et html
    Par opeo dans le forum Langage
    Réponses: 11
    Dernier message: 08/08/2007, 10h42
  4. [Mail] Envoi/Reception compte mail (pièce jointe)
    Par Curby dans le forum Langage
    Réponses: 1
    Dernier message: 27/03/2007, 20h54
  5. [FPDF] Envoi d'un mail au format PDF avec PHP
    Par King_T dans le forum Bibliothèques et frameworks
    Réponses: 2
    Dernier message: 08/05/2006, 19h19

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo