An AppleScript to search for usenet email addresses

Jun 20, '03 10:02:00AM

Contributed by: macubergeek

I ran across a way to look up email addresses on Usenet. I incorporated it into an AppleScript which automates the process. The scripts sends a specially formated email to a usenet server, and searches for the email of the name you submit.

Caveat: Depending on the provided name, this can return a lot of email addresses. Also, you must set the variable theSender to your email address.

set theSubject to ""
set theSender to "your_email@your_host.com"
set theAddress to "mail-server@rtfm.mit.edu"
set theBody to "send usenet-addresses/"

tell application "Finder"
  display dialog ¬
  "Enter name to find: LASTNAME FIRSTNAME" default answer ¬
  "Washington George" buttons {"Okey Dokey"} default button 1
  set myName to text returned of the result
      
  tell application "Mail"
    activate
    set newMessage to make new outgoing message with properties ¬
          {subject:theSubject, content:theBody & myName}
    tell newMessage
      set visible to false
      set sender to theSender
      make new to recipient at end of to recipients ¬
      with properties {name:theSender, address:theAddress}
      send
    end tell
  end tell
end tell
Thanks again to jbc and grrl_geek for their help in grokking Mail.app scripting!

[robg adds: The server may take quite a few minutes to process the request, and the list will only include addresses of people who have posted to usenet. If you don't know what usenet is, your email address is probably not going to come up. On the other hand, the usenet archives go way back in time, and if you were active, you may find a long history of your prior email addresses ... don't ask me how I know this :-). This is posted more for the AppleScript example than the exact usage of the script, but it is somewhat interesting...]

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030607125649842