For some reason, creating and sending a new mail from a rule is broken in Leopard,
a workaround is an application script with one handler, which will be called from the rule script
1) MailSender application
save the script somewhere as application
on send_mail about theSubject above theContent from myAccount for theRecipient at theAddress beside theAttachments by theSignature given doSend:doSend, isVisible:isVisible
tell application "Mail"
launch
set newMessage to make new outgoing message with properties {visible:isVisible, subject:theSubject, content:theContent}
tell newMessage
set sender to myAccount
make new to recipient at end of to recipients with properties {name:theRecipient, address:theAddress}
tell content
repeat with oneAttachment in theAttachments
make new attachment with properties {file name:oneAttachment as alias} at after the last paragraph
end repeat
end tell
end tell
if (theSignature is not equal to "") then
set theSignature to signature theSignature
set message signature of newMessage to theSignature
end if
if doSend then send newMessage
end tell
end send_mail
- a sample rule
property myaccount : "John Doe <john@doe.com>"
property theSignature : "mySignature"
using terms from application "Mail"
on perform mail action with messages selectedMsgs
repeat with msg in selectedMsgs
set theSubject to subject of msg
set theSender to extract name from sender of msg
set theAddress to extract address from sender of msg
set theAttachments to {} -- or a list of aliases
set theContent to "This is a new message"
tell application "MailSender"
launch
send_mail about theSubject above theContent from myaccount for theSender at theAddress beside theAttachments by theSignature with doSend without isVisible
end tell
end repeat
end perform mail action with messages
end using terms from