Skip to main content
REMINDER: On December 1, 2018, this forum will be closed to new posts and responses. After that date, you will still be able to view and search the forum. New discussions should take place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  IBM Lotus Notes/Domino 8.5 Forum (includes Lotus Notes Traveler)

IBM Lotus Notes/Domino 8.5 Forum (includes Lotus Notes Traveler)

Sign in to participate Previous Next
Subject: Manage blocked sender's list
Feedback Type: Problem
Product Area: Notes Client
Technical Area: Customization
Platform: Windows
Release: 8.5.3
Reproducible: -Reproducibility-

Below script work well but I want to remove quotes in output result. The script extracts blocked sender list to text file.
example "uniq@bank.com"
Sub Initialize
Dim s As NotesSession
Dim ws As NotesUIWorkspace
Dim mailDb As NotesDatabase
Dim profile As NotesDocument
Dim dbName As Variant
Dim dbServerName As String
Dim dbFileName As String
Dim blockedArray As Variant
Set s = New NotesSession
Set ws = New NotesUIWorkspace

dbName = ws.Prompt(13, "Select Mail Database", "Select the database to extract a blocked senders list from")
If IsEmpty(dbName) Then
MessageBox "No database selected; agent quitting."
Exit Sub
End If
dbServerName = dbName(0)
dbFileName = dbName(1)
Set mailDB = s.GetDatabase(dbServerName, dbFileName)
If Not mailDb.IsOpen Then
Call mailDb.Open("", "")
End If
Set profile = mailDb.GetProfileDocument("CalendarProfile")
If profile.HasItem("$Filter_BlockAddressList") Then
blockedArray = profile.GetItemValue("$Filter_BlockAddressList")
If (UBound(blockedArray) = 0) And (blockedArray(0) = "") Then
MessageBox "No blocked addresses for this database."
Exit Sub
End If
Dim ownerName As NotesName, ownerFilePart As String
Set ownerName = s.CreateName(profile.GetItemValue("Owner")(0))
ownerFilePart = Join(Split(ownerName.Abbreviated, "/"), " ")

Dim filePath As Variant
filePath = ws.SaveFileDialog(False, "Save Blocked Senders List As", "Text Files|*.txt",,ownerFilePart + "_blocked.txt")
If IsEmpty(filePath) Then
MessageBox "No filename selected; agent quitting."
Exit Sub
Else
filePath = filePath(0) 'converts single-element array to string
Dim fileNum As Integer
fileNum = FreeFile
Open filePath For Output As fileNum
ForAll blocked In blockedArray
Write #fileNum, blocked
End ForAll
Close fileNum
End If
Else
MessageBox "No blocked addresses for this database."
End If
End Sub


Feedback number WEBBB39JDW created by alpanh patel on 08/02/2018

Status: Open
Comments:

Manage blocked sender's list (alpanh patel 2.Aug.18)
. . I'm not saying this'll be what you ... (Mike Woolsey 6.Aug.18)




Printer-friendly

Search this forum


Sign In or Register

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support


 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite