Reply to Eudora Message
Summary: Creates a window in Mailsmith to reply to the current Eudora message.
Requires: Mailsmith 1.5, Eudora
Last Modified: 2010-11-27
Description
I use Eudora for my mailing list mail, since it handles large volumes of mail better than Mailsmith. However, Eudora’s mail composition interface is terrible, so I wrote this script to let me do my replies in Mailsmith.
Note that if the script addresses the message wrong, you can look in the message’s notes field to find the headers from the original Eudora message.
You can run the script from either Mailsmith or Eudora. You’ll want to adjust the part of the script that sets the sending account and signature.
Installation Instructions · Download in Compiled Format · Download in Text Format
Script
tell
application
"Eudora"
-- message 0 is the "current message"
-- the below code fails if I try to do "set m to message 0" and then access properties of m
set
theBody
to
body
of
message
0
set
theSenderName
to
sender
of
message
0
set
theFrom
to
field
"From"
of
message
0
set
theTo
to
field
"To"
of
message
0
set
theCc
to
field
"Cc"
of
message
0
set
theDate
to
message date
of
message
0
set
theSubject
to
subject
of
message
0
end
tell
tell
application
"Mailsmith"
set
theFromAddress
to
my
addressFromHeader(
theFrom)
set
theToAddress
to
my
addressFromHeader(
theTo)
set
theAttribution
to
"On " &
theDate & " " &
theSenderName & " <" &
theFromAddress & "> wrote:" &
return &
return
-- workaround since "increment quote level" doesn't work properly
set
newBody
to
theAttribution
repeat
with
p
in
paragraphs
of
theBody
set
newBody
to
newBody & "> " &
p &
return
end
repeat
make
new
message window
with properties
{
subject:
theSubject,
contents:
newBody,
sending account:"Lists",
signature:"Michael"}
make
new
cc_recipient
at
end
of
message window
1
with properties
{
address
:
theFromAddress}
make
new
to_recipient
at
end
of
message window
1
with properties
{
address
:
theToAddress}
--increment quote level of text of message window 1
-- stash some info in the Notes field in case addressFromHeader() messed up
set
theNotes
to
theFrom &
return &
theTo &
return &
theCc
set
text
2
of
message window
1
to
theNotes
end
tell
on
addressFromHeader(
theHeader)
-- This works around the fact that Eudora doesn't make the parsed headers available from the scripting interface.
-- It doesn't work for all messages because the address may not be enclosed in <>,
-- and there may be multiple addresses in the header.
set
AppleScript's
text item delimiters
to
"<"
set
theAddress
to
characters
1
thru
-2
of
item
2
of
(
text items
of
theHeader)
set
AppleScript's
text item delimiters
to
""
return
theAddress
as
string
end
addressFromHeader