• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 439
  • Last Modified:

Strange problem with read reciepts

Dear Experts

This sample code would send return reciept back to "abc@experts-exchange.com" irrespective of whoever sent the email from the notes client, but for some users , it's sending back the read reciept to the original sender

Any ideas are appreciated



Dim memo As notesdocument      

            Set memo = New NotesDocument( db )
            memo.Form = "Memo"
            Set rtitem = New NotesRichTextItem( Memo, "Body" )
            memo.Subject = newdoc.subject(0)
            Call newdoc.copyallitems(memo,False)
            success = NewDoc.RenderToRTItem( rtitem )
                  Set bccitem = memo.GetFirstItem( "BlindCopyTo")
                  memo.blindcopyto = tmpitem.values
                        memo.ReturnReceipt = "1"
            memo.replyto = "abc@experts-exchange.com"
            memo.send False


- Partha
0
p_partha
Asked:
p_partha
  • 8
  • 7
  • 3
2 Solutions
 
Sjef BosmanGroupware ConsultantCommented:
Bro, is that all the code there is, those 11 consecutive lines? There's nothing left out?

Furthermore, what do you want? I suppose that a Return Receipt should be sent to the originator of the mail, and not to abc@ee. Is that what you want? Is there any logic in the addresses that send the receipts correctly, or not? E.g. are they all Internet addresses? Or are they all Outlook Express users, and the correct ones are sent by Thunderboid?
0
 
p_parthaAuthor Commented:
I want the read reciept to go abc@ee, not to the sender
this is one of the ways we are tracking how many are really opening up the emails. All the emails are internal bro.

Partha
0
 
Sjef BosmanGroupware ConsultantCommented:
Ah, but then it's not a real receipt, I think. I suppose you also have to adapt the sender of the message, using
      memo.Principal= "abc@ee"

There are some other fields that influence the behaviour of receipt sending, I'd have to look them up. Anyway, all receipt handling is in the mail database itself. Look for the ReturnReceipt-field in the LotusScript code.
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
p_parthaAuthor Commented:
Thx bro

     memo.ReturnReceipt = "1" ' this line ensures that return receipt is sent . Also, the users want to retain their names when sent, that's why I didn't change the principal field, but i will give it a shot, will wait to hear from you whether there are any other fields that influence the return reciept to the sender apart from "replyto"

Partha
0
 
Sjef BosmanGroupware ConsultantCommented:
It's in the Common scriptlibrary, the function wReturnReceipt:

Function wReturnReceipt( note As notesdocument )
      Dim receipt As notesdocument
      
      If (note.HasItem("DeliveredDate")) And (note.getitemvalue("ReturnReceipt")(0) = "1") Then            
            If Not NameCompare(session.EffectiveUserName,note.GetItemValue("From")(0)) Then                  
                  Set receipt = New NotesDocument (db)            
                  Call receipt.replaceitemvalue("Form", "Return Receipt")
                  If wGetCalendarProfile() Then      
                        Call receipt.replaceitemvalue("IntendedRecipient", Owner)
                  Else
                        Call receipt.replaceitemvalue("IntendedRecipient", session.CommonUserName)
                  End If
                  Dim dtNow As New NotesDateTime ("")
                  Call dtNow.setNow()
                  Call receipt.replaceitemvalue("DeliveryDate", dtNow)
                  Call receipt.replaceitemvalue("Path_Info", note.getitemvalue("RouteServers")(0))
                  Call receipt.replaceitemvalue("Subject",note.getitemvalue("Subject")(0))            
                  Call receipt.MakeResponse(note)            
                  Call receipt.send (False, note.getitemvalue("From")(0))            ' <--- the receipt is sent to From...
                  Call note.replaceitemvalue("ReturnReceipt", "0")
                  Call note.Save (True, False)            
            End If      
      End If
End Function

So if you know how to set the From differently, you can change the destination for a return receipt. All the same, this method seems a bit tricky to me, relying on code in the user's database. If it were up to me, I'd remove return receipts altogether, I don't want to send a confirmation to the sender whatsoever (think of spam...).

I suppose you don't send mails with forms? If you did, it would be easier to send you a "receipt", e.g. in the PostOpen.
0
 
p_parthaAuthor Commented:
We used to send with forms, but we had some issues with blackberries so we reverted back to normal email since we do lot of formatting and stuff..

But bro, is this code from the mail template?

partha
0
 
Sjef BosmanGroupware ConsultantCommented:
Yep, it's in the R7 mail template, in the scriptlib called Common. Ah, no, you're not thinking of changing the mail template are you?? Oh dear... ;-))
0
 
p_parthaAuthor Commented:
no way i can do that :)), i dont' even have access to it. but i will try changing the "From" and "Inetfrom" and see what happens

Thx for the lead bro

Partha
0
 
p_parthaAuthor Commented:
Looks like you cannot change the "From" field programmatically :((

- Partha
0
 
Sjef BosmanGroupware ConsultantCommented:
No you can't :| It's supplied by Notes. It would have been a great way to achieve some sort of workflow, by the way! You send a message to Mr. One; when he opens the message you receive a receipt, so you can send a message to Mr. Two, etc.

Alas, in this case, as it is with many things: Notes doesn't work that way... But why receipt messages sometimes get sent one way and another time another way I don't know.
0
 
qwaleteeCommented:
Code is a little messed up to begin with.  Obvioulsy had stuff added on without paying attention to what was already there.  Otherwise, would never have the line where the subject is copied followed by copying all items... first line is then redundant.  

Also, I doubt you need all the field copied from the original memo. Let's go with something simpler, which does NOT copy all those original fields, especially the addressing fields.

But first, I need to understand something.  Are you expecting the code above to CREATE the retrun receipt message, or to create a message that automatically creates a retrun receipt when that message is opened?  Becasue that's what you've done -- you've sent the MEMO object, with the ReturnReceipt field set on.  The line memo.Send false essentially creates new messages in SOMEONE's mailbox.  When those messages are opened, a retrun receipt automatically goes to the ReplyTo address.
0
 
p_parthaAuthor Commented:
Qwal
Thx for your response,you can ignore the newdoc line as it was used to render the email using a particular form. Yes I want the mail to go to somebody's mailbox and when he opens shd send a read receipt to a abc@ee.com, irrespective of whoever sent it

Hope i am clear

Partha
0
 
Sjef BosmanGroupware ConsultantCommented:
Crystal ;-))

Can you send them a partial mail, so they have to press a button to read all of it??

"Blah blah, important message, blah blah, press this button --->"  | READ MESSAGE |

Hide-whens? Message in external database?
0
 
qwaleteeCommented:
In addition to ReplyTo, you should also set Principal to the same value.

ANd I was more concerned with the CopyAllItems.  Never use that unless you need the new document to be idnetical with the old.  In this case, you r eally don't need that, you just need maybe one or two fields (Subject, probably nothing else).  The way you have it, you're also copying the old SendTo, CopyTo, BlindCopyTo, Principal, and who knows what else, and that could be causing problems.

Finally, you set your BCC variable, then never use it.  Overall, this code needs to be rewritten, it is a mess.
0
 
p_parthaAuthor Commented:
Sjef
I suggested all your ideas...

Qwal,
I have pasted only a small part of the bigger picture. The newdocument has couple of sections, which I am using to populate with some values(i know we can directly create sections), also the bcc variable is also used, but i have removed that here...But if i change the prinicipal, it changes the sender name which they don't want... it's just that we are capturing how many of them really opening their emails

Partha
0
 
p_parthaAuthor Commented:
also qwal, copyallitems second parameter is false, so doesn't overwrite any of the already existing fields

Partha
0
 
qwaleteeCommented:
Doesn't matter if you are using the FALSE parameter, it is still bad practice to copy values you do not need or want.  For example, what if it copies a CopyTo field that you did not intend to use, and you have not forced a different value into there?  The memo will end up in the hands of a recipient who was not supposed to get it. And you carry around the baggage of possibly extraneous Received headers, etc.  Why do you want to bruden your poor mail system with this extra data?  Bad form.
0
 
Sjef BosmanGroupware ConsultantCommented:
I also move to change the title of this question. It is not so much a "Strange problem with read receipts" but more a "Request to divert read receipts, which might accidentally work because Notes handles receipts in a strange way".  

Sjef :-))
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 8
  • 7
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now