Email return receipt in Entourage

Hello,

I’m using the script : Return Receipt 2.0 from “Joel Nelson” (http://www.mmjcd.net/rrscript/index.htm).

The script works well, but I want to do a little modification, because in my pop account I receive emails from different addresses.

So I would like to have : “This is a receipt for the message you sent to Firstname Lastname on…” instead of “This is a receipt for the message you sent to Firstname Lastname on…”

tell application "Microsoft Entourage"
	
	set theMessage to item 1 of (get current messages)
	
	try
		set myAccount to POP account "Accuser"
	end try
	
	set myName to full name of myAccount
	set acctAddress to email address of myAccount
	
	-- subject 	
	set theSubject to "Read: " & the subject of theMessage

	-- receipt text 
	set theAddress to the sender of theMessage
	set theAddressString to the address of theAddress
	set theName to the display name of theAddress
	if theName is "" then
		set theName to theAddressString
		set theRecipient to theAddressString
	else
		set theRecipient to """ & theName & "" <" & theAddressString & ">"
	end if
	set theDate to time received of theMessage
	set theSent to time sent of theMessage
	set theDate to date string of theDate & " at " & time string of theDate -- now all users from OS 8.1 up can run the script 
	set theSentTime to date string of theSent & " at " & time string of theSent
	set theText to ("This is a receipt for the message <" & the subject of theMessage & "> you sent to " & myName & " <" & acctAddress & "> on " & theSentTime & ". " & return & "Your message was received on " & theDate) & "." & return & return & "Microsoft Entourage X"
	
	set replyMsg to make new outgoing message at out box folder with properties {account:myAccount, content:theText, recipient:theRecipient, subject:theSubject}
	
	send replyMsg
	
end tell

I think that I must remplace this line “set acctAddress to email address of myAccount” in something like “set acctAddress to the recipient address of theMessage”. But my line doesn’t work !!

Can you help me ?? In advance thank you !!
Tgjb.

(sorry for my bad English, it isn’t my mother tongue)

I think it is a simple change. Try changing:

try 
      set myAccount to POP account "Accuser" 
   end try 

to

try
          set myAccount to account of theMessage
    end try

Hi allenwatson,

Thank you for your suggestion, but it doesn’t answer to my “problem”.

Explanation :
I create the POP account “Accuser” only for sending “return receipt”, because my default POP account always asks a “return receipt”. Then if I use my default POP account in order to send “return receipt” : the “return receipt” asks a new “return receipt”… It looks like a infernal circle !!

What I want :
My defaut POP account receives emails from the email of my provider and from the email of my university (by a forwarding). So I want that the script uses the address email which people use to contact me, and not the address email which is in my default account.

Example :
If John sends me an email at “me@myuniversity.com”, I didn’t want that John receives this return receipt with the text : “This is a receipt for the message you sent to Me me@myprovider.com on…”.
I want that John receives this one : “This is a receipt for the message you sent to Me me@myuniversity.com on…”.

Note : the POP account “Accuser” which I use for sending “return receipts”, has a special address email : accuses@myprovider.com, so everybody see that it is a “return receipts” and not really a mail.

I hope that it is more clear now…
But don’t hesitate for asking questions !!!