It seems a lot of Applescripters are not aware of this support offered by Mail.app. When writing Applescripts for Mail, it's extremely easy to fetch the name and e-mail address of a sender ...
That's all there is to it!
using terms from application "Mail" on perform mail action with messages theSelectedMessages tell application "Mail" repeat with eachMessage in theSelectedMessages set theSender to extract name from sender of eachMessage display dialog "name:" & theSender set theAddress to extract address from sender of eachMessage display dialog "address:" & theAddress end repeat end tell end perform mail action with messages end using terms from
Mac OS X Hints