Manage Learn to apply best practices and optimize your operations.

Delete dangerous attachments

This tip is a variation of a script to delete unwanted mail attachments.

This is a variation of a script to delete unwanted mail attachments.

  
  Code: 
extList := "*.vba*":"*.com*":"*.bat*":
"*.pif*":"*.cmd*":"*.exe*":"*.vbs*":"*.hta
*":"*.cpl*":"*.js*";


mEmailSendTo := From + " , " + SendTo;
mEmailBCC := "";
mEmailCC := "";
mEmailSubject := "REJECTED: " + 
subject; mEmailBody := "The message with the 
subject '" + subject + "'
 was rejected because it contained bad attachment." + 
@Char(13)
+@Char(0) + @Char(13) +@Char(0) + 
"Our policies do not allow those types 
+of files.";

attList := @AttachmentNames;
status := @Matches(@Implode( attList ; " " ) 
; @Implode( extList ; "|" ) );

@If( status ;
 @Do(
  @DeleteDocument;
  @MailSend(mEmailSendTo ; mEmailCC ; mEmailBCC ; 
mEmailSubject  ; mEmailBody)
 )
 ;
 ""
)
;
SELECT @All

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip exchange by member Sidney Nwajei. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.

Dig Deeper on Lotus Notes Domino Agents

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