Can Applescript fix this problem with no Reply-To field in mail rules.

Hi I'm trying to sent up an automatic response email in mail rules, the problem is when I filter the email I want to respond to, I don't get the option to send a response to the "Reply-To" field, I can only reply to the "From" field which is no good to me. The mails I receive are booking inquiries generated by an online form so the "From" field is always the same email address not the guest address which is in the "Reply-To" field.
Can any applescript genius out there help me out, it would save me so much time !!
Thanks
Jon

Give this a shot. Change the text in the quotes in the property line to whatever you want for the body.
property theBody : "This is the autoreply message"
property theQuote : "You wrote:"
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
repeat with aMessage in theMessages
set theSubject to "Re: " & the subject of aMessage
set theReplyTo to reply to of aMessage
if theQuote is not "" then
set theBody to theBody & return & return & theQuote & return & return & the content of aMessage
end if
set theReply to make new outgoing message with properties {subject:theSubject, content:theBody}
tell theReply
make new to recipient with properties {address:theReplyTo}
end tell
send theReply
end repeat
end tell
end perform mail action with messages
end using terms from
If you set theQuote to "", then it won't quote the original. The quote is plain text, so not a great solution.
There is an option in Applescript to reply to a message, but it does the same as the rule. I tried to edit that message, but it didn't let me. So, I went with the above method.
You might try [the Applescript forum|http://discussions.apple.com/forum.jspa?forumID=724].

Similar Messages

Maybe you are looking for