Manage Learn to apply best practices and optimize your operations.

Remove invalid e-mail addresses

This Content Component encountered an error
LotusScript Agent to parse Names field "EnterSendTo" in memo form of the mail5.0 template. Agent will remove any items not containing the @ symbol, and as it is doing so will report each address in a prompt, append each item one by one, and display count of valid addresses when finished. The prompts are meant to be removed, they are only there as a highlighter. Once prompts are removed, this agent will serve to avoid the "Name not found, OK to skip, etc" message by auto modifying the SendTo list prior to the field refresh.
Sub Initialize
	Dim ns As New NotesSession
	Dim nws As New NotesUIWorkspace
	Dim uidoc As NotesUIDocument	
	Dim ndoc As NotesDocument
	Dim subj As Variant
	Dim count As Integer
	Dim inx As Integer	
	count = 0
	Set ndoc = nws.CurrentDocument.Document	
	subj = ndoc.GetItemValue( "EnterSendTo" )
	Call nws.CurrentDocument.FieldSetText("EnterSendTo", "") 
	Forall s In subj
		If Instr(s,"@") >0 Then
			Call nws.CurrentDocument.FieldAppendText("EnterSendTo",
 s + ",")
			Msgbox s, 32, "Valid" 
			count = count + 1
		Else
			Msgbox s, 32, "Invalid -- Value Removed"	
		End If
	End Forall
	Msgbox count, 32, "Number of Valid Addresses" 

End Sub
		
 
This was last published in April 2001

Dig Deeper on Domino Resources - Part 5

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

SearchDataCenter

SearchExchange

SearchContentManagement

Close