dany108
Messages postés71Date d'inscriptionmardi 29 janvier 2002StatutMembreDernière intervention 6 janvier 2011
-
30 déc. 2002 à 20:55
dany108
Messages postés71Date d'inscriptionmardi 29 janvier 2002StatutMembreDernière intervention 6 janvier 2011
-
31 déc. 2002 à 19:21
Bonjour à tous,
j'ai besoin d'envoyer des mails en automatique depuis une appli VB6.
Sur les machines équipées d'Outlook, c'est sans problème.
Par contre sur les bécanes équipées uniquement de Lotus Notes (V 5.0.8) cela ne marche pas.
J'ai entendu parler d'un objet Lotus.mail mais le site de Lotus
(http://www.lotusnotes.com) étant uniquement en anglais et moi pas causer la langue.
ProutLeGus
Messages postés15Date d'inscriptionjeudi 14 novembre 2002StatutMembreDernière intervention17 février 2012 31 déc. 2002 à 10:39
Salut
Normalement, Lotus notes est 100% compatible MAPI. Donc, tu n'as besoin de rien de spécial pour envoyer un mail. Je l'ai deja testé avec notes 5 et notes 6, ca fonctionne tres bien. Par contre, tu peux aussi employer les objets Notes. Voici un exemple :
Private Sub SendMail()
Dim sUser As String, sServer As String, sMailfile As String
Dim doc As Object, session As Object, dbo As Object
Dim item As Object, rtitem As Variant
' Visual indications to user
Screen.MousePointer = vbHourglass
If bNewLoan Then
Label3.Caption = "Loan file is being sent..."
ElseIf bOldLoan Then
Label3.Caption = "Loan file is being resent..."
End If
Set session = CreateObject("notes.notessession")
sUser = session.UserName
sServer = session.GETENVIRONMENTSTRING("MailServer", True)
sMailfile = session.GETENVIRONMENTSTRING("MailFile", True)
Set dbo = session.GETDATABASE(sServer, sMailfile)
Set doc = dbo.CREATEDOCUMENT()
doc.Form = "Memo"
'**** REMOVE NEXT LINE FOR FINAL COMPILE *********
doc.sendto = "warren.bettes@bankofamerica.com"
'**** MAKE THIS LINE ACTIVE FOR FINAL COMPILE ****
' doc.sendto = LCase(sEmAddress)
doc.Subject = "Doc files for Loan # " & sLoanNum
Set rtitem = doc.CREATERICHTEXTITEM("body")
With rtitem
.APPENDTEXT "TO: " & sCoName
.ADDNEWLINE 2
.APPENDTEXT "Upon receipt, please open and examine all loan docs. "
.APPENDTEXT "Any discrepencies should be immediately reported to:"
.ADDNEWLINE 1
.APPENDTEXT "Lisa Walker-Ernst 904.457.5937 -or- "
.APPENDTEXT "Angie Morris 904.457.2317."
.ADDNEWLINE 2
.APPENDTEXT "Thank you for using EquiCredit"
.ADDNEWLINE 3
End With
' Specify & embed .exe file as attachment to e-mail
' **** THIS IS THE BOTTLENECK OF THE APP ****
If bNewLoan Then
Set item = rtitem.EMBEDOBJECT(1454, "", sPathName & sLoanNum & ".exe")
ElseIf bOldLoan Then
Set item = rtitem.EMBEDOBJECT(1454, "", sPathName & "\prtfiles" & sLoanNum & ".exe")
End If
' Save copy to Notes db (may save in Sent or Drafts folder)
doc.SAVEMESSAGEONSEND = True
doc.Send (False)
' Move new files to archive directory
If bNewLoan Then MoveFiles
Set doc = Nothing
Set session = Nothing
Set dbo = Nothing
Label3.Caption = "DONE!!!"
Label3.ForeColor = vbRed
cmdExit.SetFocus
Screen.MousePointer = vbDefault
End Sub
dany108
Messages postés71Date d'inscriptionmardi 29 janvier 2002StatutMembreDernière intervention 6 janvier 20111 31 déc. 2002 à 19:21
Merci de ta réponse, je vais tester cela dès jeudi.
Par contre connais-tu un lien ou je pourrais avoir toutes les fonctionalités de l'objet Notes.
(En français si possible.)