Dead Mail Search and Report

Now you can search for dead mail by author or subject and compose a text and send it to anyone.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim object As NotesEmbeddedObject
Set db = session.GetDatabase("server", "mail.box" )
AutorDoc="CN=Admin Notes/O=xxxxx"
REM Set Vista= dbmail.GetView( "Mail" )
Dim collection As NotesDocumentCollection
Dim dateTime As New NotesDateTime("12/01/94")

searchFormula$ = "Form = ""NonDelivery Report"" & Routingstate =""DEAD"" & subject=""subject"" & from=""from@sss.com"""
Set collection = db.Search(searchFormula$,dateTime,0)
If collection.Count>=1Then
fileNum = Freefile
fecha=Date
Open "c:maildead.txt" For Output As fileNum
For i = 1 To collection.Count
Set doc = collection.GetNthDocument(i)
plainText=doc.from(0)+" "+doc.subject(0)+" "+doc.Sendto(0)
+" "+doc.deadFailureReason(0)
REM Messagebox plainText
Print #fileNum, plainText

Next
Close #fileNum
End If

REM CORREO RESPONSABLES
Set db=session.currentdatabase
Dim rtitem As NotesRichTextItem
Dim docB As NotesDocument
Set docB = New NotesDocument(db)
email = "tome@ert.com"
Set rtitem = New NotesRichTextItem( docB, "Body" )
Set object = rtitem.EmbedObject ( EMBED_ATTACHMENT, "", "c:maildead.txt")
docB.Form = "Memo"

docB.Subject = "MY DeaD MAILS"

docB.SendTo=email

docB.Body="Anexo archivo de estados de cuenta no enviados por el servidor"
docB.Importance="1"
docB.DeliveryPriority="H"
Call docB.send( False )

This was last published in November 2000

Dig Deeper on Domino Resources - Part 3

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close