the list of previous recipients in Mail.app is saved in a sqlite3 database in ~/Library/Application Support/AddressBook
Sometimes it could be helpful to save the contents into a text file on desktop.
So my first attempt was:
set MailRecents to quoted form of POSIX path of ((path to application support from user domain as text) & "AddressBook:MailRecents-v4.abcdmr")
set a to paragraphs of (do shell script "sqlite3 " & MailRecents & " 'select * from ZABCDMAILRECENT'")
set dbase to {}
set TID to text item delimiters
repeat with i in a
set text item delimiters to "|"
set t to text items of i
set text item delimiters to tab
set end of dbase to t as text
end repeat
set text item delimiters to return
set dbase to dbase as text
set text item delimiters to TID
set targetFile to ((path to desktop as text) & "MailRecents-v4.txt")
set ff to open for access file targetFile with write permission
write dbase to ff
close access ff
after some “investigations” I found a shorter and much faster version
do shell script "sqlite3 " & quoted form of POSIX path of ((path to application support from user domain as text) & "AddressBook:MailRecents-v4.abcdmr") & " 'select * from ZABCDMAILRECENT' | tr '|' \\\\t > ~/Desktop/MailRecents-v4.txt"
do shell script "sqlite3 -header -separator ' ' " & quoted form of POSIX path of ((path to application support from user domain as text) & "AddressBook:MailRecents-v4.abcdmr") & " 'select * from ZABCDMAILRECENT' > ~/Desktop/MailRecents-v4.txt
"
Note: -separator ’ ’ is -separator ‘\t’ , just AS converts it to a TAB