Read Mail

Currently all I’m aiming to build is a script which checks for new mail, tells the user how many unread messages exist and then read out messages if the users asks.

All I can do so far is have it read out how many unread messages there are, it goes mad when opening anything! Help would be good…!

tell application "Mail"
	set unreadmessages to unread count of inbox
	set myInbox to mailbox "INBOX" of account 1
	set myMessages to every message of myInbox
	check for new mail
	if unreadmessages > 0 then
		say unreadmessages
		say "new message"
		if read status of myMessages is false then
			select message
		end if
		say "No, new messages."
	end if
end tell