Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Generate 'Read Receipts' in Mail.app Apps
The only major feature that I missed when moving from Entourage v.X to Mail.app was the ability to request and return Read Receipts. I finally came across this article which explained how to add custom headers to Mail.app. In the case of adding a Read Receipt Request, all that's need is a Disposition-Notification-To header. In the Terminal, type this:

$ defaults read com.apple.mail UserHeaders
$ defaults write com.apple.mail UserHeaders \
'{"Disposition-Notification-To" = "user@domain"; }'
Note that using the second command will erase all your other custom headers (the first command shows any you have created). So it might be easier to use the Property List Editor if you want several custom headers, such as a FOAF link. The .plist is located at ~/Library/Preferences/com.apple.mail.plist. With that done, it is just a matter of adding a rule to Mail.app to handle incoming Read Receipt requests. You'll need to use the "Edit Header List..." option to add Disposition-Notification-To to your list of choices. My final rule looks like this:
  • Description: Read Receipt Requested
  • if (all) of the following conditions are met:
    • (Disposition-Notification-To) (contains) (@)
  • Perform the following actions:
    • (Run AppleScript) (~/Library/Scripts/Mail Scripts/Return Receipt.scpt)
This AppleScript will be called by the rule and generate a simple message that says the message was received.

[robg adds: I haven't tested this one.]
    •    
  • Currently 3.13 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (8 votes cast)
 
[132,807 views]  

Generate 'Read Receipts' in Mail.app | 25 comments | Create New Account
Click here to return to the 'Generate 'Read Receipts' in Mail.app' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Generate 'Read Receipts' in Mail.app
Authored by: GlowingApple on May 23, '05 03:33:40PM

From what I understand this takes care of when you as a reciever are sent a message that requests a return receipt, but is there any way to send a message that requests a return receipt through Mial.app?

---
Jayson --When Microsoft asks you, "Where do you want to go today?" tell them "Apple."



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: Daij-Djan on May 23, '05 04:10:14PM

Id love this feature too!



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: leamanc on May 23, '05 10:41:03PM

This hint covers both sending and requesting return receipts. The terminal commands mentioned in the top of the hint set up Mail.app to request return receipts.



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: felix-fi on May 24, '05 12:42:21AM

Is this working with Mail.app 2? (i.e. Tiger)

I have the feeling that UserHeaders are not working anymore.



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: club60.org on May 24, '05 02:47:10AM

Why not just look in your Sent folder and use View > Message > Long Headers?



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: leamanc on May 24, '05 01:42:52PM

Works for me, Tiger 10.4.1.



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: Mike Dillingham on Jun 19, '05 05:52:04PM

This one appears to be broken in 10.4.1. The return reciept message gets created, but if you don't hit send instantly, the spinning beach ball shows up and you have to force quit mail.



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: MacOfTheEast on May 26, '05 05:55:57AM

Does anyone have an idea how to enable receipt requests on a per-account basis? This hint appears to enable them across the board.

Thanks



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: eduo on May 29, '05 05:42:09PM

Quick comment: This settings would also mean that spam mails would get an auto-response. Automatically confirming your email address is valid. I set it up once and my spam started multiplytiojng itself.

---
Eduo



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: jmcook on May 31, '05 05:12:07PM

The AppleScript, as written, doesn't automatically send the message; it creates the message, but the user is still required to Send it.



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: serko92 on Aug 26, '05 01:36:35PM
Here is a version of the script that will invisibly send the return receipt message, just like Outlook or any other app
with that capability would, without you having to click "Send":

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 theDate to date sent of msg
			tell application "Mail"
				set nowDate to current date
				set theBody to "Your message" & return & return & "    Re: " & theSubject & return & "       Sent: " & theDate & return & return & "was received" & nowDate & ". You WILL NOT get a second confirmation when the message is actually read.  Thank you." & return
				set newMessage to make new outgoing message with properties {subject:"Return Receipt: " & theSubject, content:theBody & return & return}
				tell newMessage
					make new to recipient at end of to recipients with properties {name:theSender, address:theAddress}
				end tell
				send newMessage
			end tell
		end repeat
	end perform mail action with messages
end using terms from

Also I want to point out that if you send an email to yourself, the Mail Rule mentioned in the article will send a receipt to yourself,
and then a receipt of that receipt, and another, and so on. Every receipt generated contains the same header that triggers the receipt Rule,
so the cycle never ends. Therefore the Rule should be changed to:
  • Description: Read Receipt Requested
  • if (all) of the following conditions are met:
    • (Disposition-Notification-To) (contains) (@)
    • (Subject) (does not contain) (Return Receipt)
  • Perform the following actions:
    • (Run AppleScript) (~/Library/Scripts/Mail Scripts/Return Receipt.scpt)
Other than that - the best solution I have come across, while searching for a way to do this.

[ Reply to This | # ]
MailPriority 1.4.1 plug-in
Authored by: reinmund on Nov 15, '05 10:27:22AM

The plug-in MailPriority 1.4.1 allows to request receipts on a case-by-case basis. Haven't tried it yet, but looks promising.

http://home.tiscalinet.ch/david.frank/projects/mailpriority/



[ Reply to This | # ]
MailPriority 1.4.1 plug-in
Authored by: da2357 on Mar 09, '06 04:34:16PM

MailPriority isn't supported for OS X 10.4.x however! I don't need to request read receipts often, so I use the developer Property List Editor to add the appropriate User Header before I send those messages... and delete the Header afterwards so I don't request it from everyone. This definitely isn't elegant and requires a few seconds time, but it works for now... though I wish Apple would formally let us add Disposition-Notifiction-To headers as easily as it lets us use Reply-To headers.



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: damies on Dec 28, '05 02:39:34AM

Could some one with apple script experiance write a script or 2 to do the following:

1) Turn on return receipts:
defaults write com.apple.mail UserHeaders '{"Disposition-Notification-To" = "email@some.site.com"; }'

2) Turn off return receipts:
defaults delete com.apple.mail UserHeaders

so that these scripts could be with in easy reach when needed.

Dave.



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: scottorama on Jan 09, '06 02:20:51AM

Save these as two different scripts, then you can turn the receipts on/off at will!

Also, if you save the filenames as: ThisIsMyGetThenScript___ctl-g.scpt and
ThisIsMyCancelThemScript___ctl-c.scpt, you can use ctl-g and ctl-c as shortcuts to turn the receipts on and off!

To verify the headers are working, you can open your Sent folder, select the outoging message and the select View->Message->Long Headers to see the Disposition-Notification-To header is on the email.

I did have to restart Mail to have the changes take effect... unfortunately... but maybe YMMV!

Good Luck!

(Open Applications->AppleScript->Script Editor and copy/paste these into two new scripts. Save the scripts in the Folder: Applications->AppleScript->Example Scripts->Mail Scripts. Make sure to put the address you want the receipts to come to in place of email@some.site.com! And be sure to use those backslashes to keep AppleScript Editor happy!)

-- Turn On
tell application "Finder"
do shell script "defaults write com.apple.mail UserHeaders '{\"Disposition-Notification-To\" = \"<email@some.site.com>\"; }'"
end tell

-- Turn OFF
tell application "Finder"
try
set rc to do shell script "defaults delete com.apple.mail UserHeaders"
on error
return
end try
end tell



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: The Cardinal on Mar 10, '06 01:29:17AM

I tried this in 10.4.5 with mail 2.0.7 and it doesn't work.

It lets me add the customer header but never displays it.



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: The Cardinal on Mar 10, '06 05:14:55AM

Sorry. that's rubbish. I set up a rule to change the background colour of messages requesting a read receipt and it worked, and the header was displayed.

The problem was that I am at a client's site and when I sent myself a message with a read receipt, the client's mail app has stripped it out of the message.

One problem though - reading this hint gave me the impression that I would be able to ask for a return receipt on outbound messages but I cannot. Have I misunderstood this hint?



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: The Cardinal on Mar 10, '06 05:39:57AM

I was obviously having a bit of a blond moment!

The terminal entry specifies the e-mail address that the read receipt will be sent to for all outbound messages!

D'oh!

This works although it is obviously a bit limited in that you can't do it per message.

Thanks for the hint though.



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: Ody on Sep 06, '06 05:20:56AM

I think I found another way to convince Mail to request return receipts.

(*
This script is based upon the Standard Apple Script "Create New Mail" located in the folder
/library/scripts/mailscripts. I have deleted the unneccesary parts (at least for this purpose).

As in the original script, the modified script asks to select the account from which the email
should be sent. The rest of the procedure is pretty much the same as the original.

The only "innovation" you see in line 22. Since we know the sender through the selection procedure,
I afterwards added a line break and then the required headerline (Disposition-Noticiation-To:)
together with the senders email that we already know. Please take care that theSender that
comes out of your address book doesn't contain single or double quotation marks. In this case
the mail will be sent out but the recipient will see no receipt request.

If this works well, you will see something strange in your Sent items mail folder. The sender
shows up like: YOUR_NAME DISPOSITION_NOTIFCATION_TO: YOUR_NAME YOUR_MAILADDRESS

I think that mail.app misinterpretes the header due to some unknown internal reasons. It's
still a valid Email that you can resend and forward to others.

The last things you then have to do is just to add two new rules: one for your Sent items Box
and the other one for the Inbox.

To mark the mails where you have requested a Notification just build a rule that checks
if the sender contains a string like Disposition-Notification-To: and clour it as you like.

For the Inbox you have add within "Create New Rules" a new Headerline named "Disposition-Notification-To"
and then check if this headerline contains an @-sign. Thats it.

This is an example for "New Email & Receipt" If you want to be perfect you can do the same with
"Answer & Receipt", "Answer to All & Receipt" and "Forward & Receipt" and by using i.e. iKey2
you can run those scripts from an external menu or Hot-key. If you like you can try to start the
script(s) from within Mail Act-On. But my Apple Mail always crashed when I tried to do this.

This has been tested on Intel Mac under 10.4.7 together with Exchange 2003, Exim and Postfix

Good luck - Ody

*)


tell application "Mail"
set listOfSenders to {}
set everyAccount to every account
repeat with eachAccount in everyAccount
set everyEmailAddress to email addresses of eachAccount
if (everyEmailAddress is not equal to missing value) then
repeat with eachEmailAddress in everyEmailAddress
set listOfSenders to listOfSenders & {(full name of eachAccount & " <" & eachEmailAddress & ">") as string}
end repeat
end if
end repeat
end tell

set theResult to choose from list listOfSenders with prompt ¬
"Which account would you like to send this message from?" without multiple selections allowed
if theResult is not equal to false then
set theSender to item 1 of theResult
tell application "Mail"
set newMessage to make new outgoing message with properties {}
tell newMessage
set visible to true
set sender to theSender & return & "Disposition-Notification-To: " & theSender
end tell
activate
end tell
end if



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: wallybear on Jan 25, '08 02:05:35PM

Almost correct, but sender address is malformed (and some mail servers reject the email, as I verified).

To solve the problem (and get correct sender headers also in your Sent box) replace the following line:

set sender to theSender & return & "Disposition-Notification-To: " & theSender

with this one:

set sender to theSender & ASCII character(10) & "Disposition-Notification-To: " & theSender

The header lines are separated by chr(10), not chr(13) (the return you originally put in that line). This explains why you got strange sender headers in your Sent box, and why some mail server reject so formed messages.

With the above correction, it worked like a charm.



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: leenoble_uk on Sep 06, '06 05:58:53AM

I realise this is probably not the time or the place but...

gah, I hate receipts. I regard them as an invasion of privacy. I don't want people knowing that I've seen their email they sent any more than I want them to know I'm call screening and I'm sitting by the phone and not answering it because I know who it is.

I might be in a bad mood or just be too busy to respond at that particular moment. The fact they now know I read the email and I haven't responded in the next 5 minutes means they'll probably call to find out why. Receipts are a bad idea and I was glad that Apple left them out by default. They are a rude, intrusive tool.

Still, if your workplace requires them, well now you have a way to use Mail at work and not be left out of urgent office communications like "Please wash your cups up after use, don't leave them for someone else".

Sorry. :)

---
Brought to you by S C Johnson, a family multinational conglomerate.



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: Bassman59 on Sep 06, '06 01:31:53PM

I agree with lee_noble.

Return receipts are annoying, and it's good that Mail doesn't bother with them. Hopefully, Apple WON'T add a return-receipt option in new releases.



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: johnsmth.smith15 on Jun 18, '09 02:31:29AM
What happens on the senders end when you read open their email to you but select (NO) on the return receipt….do they see that you opened their email anyway….what do they see about the email they sent you with the return receipt request? John (web site design)

[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: DKroot on Nov 20, '11 05:01:53PM

I am looking for any solutions to return read receipts as mandated by my company's policy. This is the best potential solution that I was able to find, but there is a problem with the script in Snow Leopard's Mail. It generates receipt for wrong, older messages. Namely the first message in my Inbox will be used, instead of a new incoming message. I'll try to troubleshoot now, but I don't program in AppleScript. Any idea on what might be a problem?



[ Reply to This | # ]
Generate 'Read Receipts' in Mail.app
Authored by: jonny.nyc on Dec 13, '13 03:58:34PM

Anyone know if this is working or an alternative?



[ Reply to This | # ]