REBOL [
    Title: "Email Text Files"
    File:  %mailfiles.r
    Date:  10-Sep-1999
    Purpose: {
        This example sends a group of text files as
        separate messages.
    }
    Note: {Puts the name of the file in the subject line.}
    Category: [email file net 2] 
]

directory: %.      ; where to find the files
pattern: %mail*.r  ; a pattern to match particular files

foreach file read directory [
    if find/match/any file pattern [
        send luke@rebol.com reform [
            "File:" file newline newline read file
        ]
    ]
]