Manage Learn to apply best practices and optimize your operations.

Domino Fax Server 4.5

This was an Administration issue. When the Domino Fax server fails to deliver a fax, it returns the sender a copy of their fax, but does not inform them that this means the fax delivery has failed. Most users don't understand the significance of having the document returned to them, so Ritchie Kolnos and I wrote a simple agent that will notify a user specifically when a fax fails to be delivered and provide a link to the fax log so they can see the reason it failed.

The first step is is to create a view in the Domino Fax log. Call the view "Failed", for example. Next, create an agent in the Domino Log database using the code shown below in the Initialize event. We scheduled the agent to run hourly.


Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As Notesdocument
Dim nextdoc As Notesdocument
Dim newdoc As Notesdocument

Set db = session.CurrentDatabase
Set view = db.GetView ("Failed")
Set doc = view.GetFirstDocument
Set nextdoc = view.GetNextDocument ( doc )

While Not (doc Is Nothing)

sendto = doc.GetItemValue("SendTo" )
originator = doc.GetItemValue( "IS_RequestOriginator" )

' Create a mail memo that we will be sent to the selected user.
Set newdoc = New NotesDocument ( db )
'Set the new document's form so it'll be readable as a mail memo.
newdoc.Form = "Memo"
'Set the new document's Subject
newdoc.Subject = "***** Domino Fax Not Successful *****"
' Set the new document's Body
Set mailBody = New NotesRichTextItem( newdoc, "Body" )
Call mailBody.AppendText ( originator(0) & "!" )
Call mailBody.AddNewLine( 2 )
Call mailBody.AppendText ( "The facsimile you sent to " + sendto(0) + " did not complete successfully. Please try again. Refer to the doc link below for an explanation as to why the fax did not complete successfully.")
Call mailBody.AddNewLine( 2 )
Call mailBody.AppendDocLink( doc, "Fax Log Database")
Call mailBody.AddNewLine( 2 )
Call mailBody.AddTab( 1 )
Call mailBody.AppendText( "Thank you" )
Call mailBody.AddNewLine( 1 )
Call mailBody.AddTab( 1 )
Call mailBody.AppendText( "The Notes Team" )

Set nextdoc = view.GetNextDocument ( doc )

' Mail this document to the user.
Call newdoc.Send( False, originator( 0 ) )
'Adds the 'Processed' field to the selected document and gives it a value of "Yes"
doc.Processed = "Yes"
'Save the document after processing
Call doc.save(True,True)
'Process the next document in the view
Set doc = nextdoc

Wend

End Sub

Dig Deeper on Domino Resources - Part 3

Start the conversation

Send me notifications when other members comment.

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 ...

SearchDataCenter

SearchContentManagement

Close