Adding a header to a single message

35 views
Skip to first unread message

John Delacour

unread,
Apr 13, 2013, 10:13:33 AM4/13/13
to mailsmi...@googlegroups.com
When I send invoices and in certain special circumstances I like
to request a return receipt. I can add the
Disposition-Notification-To:... header to an account so that all
messages sent from that account ask for RR (manually only and
not by script, so far as I can see), but I wonder if it is
possible, using a script, to add the header only to individual
outgoing messages.

JD


Rich Siegel

unread,
Apr 13, 2013, 11:59:38 AM4/13/13
to mailsmi...@googlegroups.com
It is not.

R.
--
Rich Siegel Bare Bones Software, Inc.
<sie...@barebones.com> <http://www.barebones.com/>

Someday I'll look back on all this and laugh... until they sedate me.

zeon.ma...@123mail.org

unread,
Apr 13, 2013, 1:41:30 PM4/13/13
to mailsmi...@googlegroups.com
I add this script to add headers to the plist when I am sending an
email. I use scripts instead of stationery in Mailsmith:

_______________________________________
tell application "System Events" to tell contents of property list file
PlistFile
tell property list item "Sending:AdditionalHeaders"
set value to "Return-Receipt-To: XX <info...@XX.com>" &
return & "Disposition-Notification-To: XX
<info...@XX.com>"
end tell
end tell
________________________________________

It does put the return receipt headers into the plist, but I am not sure
if it actually causes a return receipt to be delivered to the user. I do
get "Read" messages from my recipients, though.

Mailsmith extra headers are set in two ways:
1. per account. There is a tab window called Headers in each account and
once you shut down Mailsmith these headers disappear and you have to put
them in again. Some of my stationery scripts remind me to put the header
text in. You can save the headings text in Mailsmith's Clippings.

2. In Mailsmith Preferences/Sending there is a box for putting any extra
headings you want. The trouble is that ALL messages sent from any
account will include those extra headings, and you have to be really
careful that this field is empty to avoid embarrassment and end
anonymity to some addresses. I suspect the plist puts the address there,
but I am not sure.

I am an ex-Eudora user and I still miss it badly. Mailsmith is OK but
aside from its dislike of return receipts (considered by many to be a
security risk), it has an unbelievably slow search function, especially
if you are used to Eudora's no fuss, fast and accurate searching. If you
have an email account with multiple addresses/personalities/aliases (for
example Fastmail) Mailsmith cannot handle replying very well and you
have to ensure that the correct address is in the "From" field.

I have archived (test run) my Mailsmith emails into EagleFiler which I
can search much more quickly. However, I am yet to create or find an
AppleScript which will enable me to set up regular archiving. I have
close to 200,000 messages and doing the update manually is very tedious.

You can try PowerMail which does return receipt by account (and the
return receipt text does not disappear). It is produced by the Foxtrot
people which is a marvellous search engine, far better than Spotlight.
PowerMail is pretty old and I am still working out its features. It does
not have stationery but you can easily use AppleScript to send emails.
It is mostly a plain text emailer, like Mailsmith and Eudora but like
Eudora it can also send and receive rich text. It has an inbuilt
archiving feature.

You can also check out Gyazmail. I haven't looked at it deeply yet.

Really sad that in the 21st century nothing really matches Eudora's
features :-(

HTH
> --
> You received this message because you are subscribed to the Google Groups
> "Mailsmith Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mailsmith-tal...@googlegroups.com.
> To post to this group, send email to mailsmi...@googlegroups.com.
> Visit this group at http://groups.google.com/group/mailsmith-talk?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

zeon.ma...@123mail.org

unread,
Apr 13, 2013, 2:08:50 PM4/13/13
to mailsmi...@googlegroups.com
> anonymity to some addresses. I suspect the plist puts the [return receipt headers] there,
Sorry, made an error: in third paragraph after AppleScript text last
sentence should start: "I suspect the plist puts the [return receipt
headers] there,.." rather than address.

John Delacour

unread,
Apr 13, 2013, 5:40:52 PM4/13/13
to mailsmi...@googlegroups.com
On 13/4/13 at 18:41, zeon.ma...@123mail.org wrote:

>I add this script to add headers to the plist when I am sending an
>email. I use scripts instead of stationery in Mailsmith:
>
>tell application "System Events" to tell contents of property list file
>PlistFile
>tell property list item "Sending:AdditionalHeaders"...

Yes, thank you, that does work. I also tried the shorter

do shell script "defaults write com.barebones.mailsmith" & ¬
" 'Sending:AdditionalHeaders' 'Disposition-Notification-To:J...@BD8.com'"

and that works, as this message should demonstrate so I would
have to write a script to get the address of the sending
account/personality, put that in the plist, send just that
message and then remove the header from the plist. Easy enough
to do. Luckily Mailsmith does seem to read the plist each time.

>I am an ex-Eudora user and I still miss it badly. Mailsmith is OK but...

Me too. I must say that changing to Mailsmith after a few
months of Thunderbird and Mail is like a breath of fresh air,
but with Eudora I could do absolutely anything I wanted. There
will never be anything to come close to Eudora unless Rich
decides to rewrite Mailsmith, and I really can't believe there's
no market for a proper mail programme. I've tried all the other
things like GyazMail and PowerMail but any mail programme is
useless to me without a serious scripting dictionary.

JD




Zeon

unread,
Apr 14, 2013, 6:13:49 AM4/14/13
to mailsmi...@googlegroups.com
Thanks for the shorter version. I might add it to my stationery scripts.

Just remember to remove the additional headers from Preferences....

There are full scripts in this forum for Mailsmith stationery messages which I have adapted for my use, but if you are an expert AppleScript person then you could probably set up your own.

I haven't been able to set up an automatic removal of the additional headers because I usually fiddle with the stationery before it is sent, adding particular attachments etc. I have a separate script for clearing the plist but if you can do a script which upon pressing the "send" button for instance which does the clearance, can you please share it?

John Delacour

unread,
Apr 14, 2013, 2:00:52 PM4/14/13
to mailsmi...@googlegroups.com
On 14/4/13 at 11:13, zeon.ma...@123mail.org (Zeon) wrote:

>...if you can do a script which upon pressing the "send" button for instance which does the clearance, can you please share it?

I'm not yet too familiar with Mailsmith's AS dictionary and some
things seem rather odd. The dictionary has the commands 'queue'
and 'send', eg.:

send v : Send items
send specifier : Items to send
→ item : Outgoing items

I would expect the object of these verbs to be a message or a
list of messages but 'send _messageRef' throws an error.
Instead I have to send or queue the _window_ it seems!

Here is a script which sends the message composed in the front
window adding the Disposition-Notification-To header and then
removes the header from the plist. Whether the delay is
necessary I'm not sure. Let me know if it works for you.

tell application "Mailsmith"
tell the front window
save
set _address to address string of originator of its message
do shell script "defaults write com.barebones.mailsmith
'Sending:AdditionalHeaders' 'Disposition-Notification-To:" &
_address & "'"
send
end tell
end tell
delay 1
do shell script "defaults write com.barebones.mailsmith
'Sending:AdditionalHeaders' ''"

--JD

Reply all
Reply to author
Forward
0 new messages