Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Strange problem with read reciepts

Posted on 2007-07-30
20
Medium Priority
?
435 Views
Last Modified: 2013-12-18
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
Comment
Question by:p_partha
  • 8
  • 7
  • 3
18 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 19593056
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
 
LVL 14

Author Comment

by:p_partha
ID: 19593072
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
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 500 total points
ID: 19593141
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Author Comment

by:p_partha
ID: 19593179
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
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 19593399
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
 
LVL 14

Author Comment

by:p_partha
ID: 19593442
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
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 19593633
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
 
LVL 14

Author Comment

by:p_partha
ID: 19593668
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
 
LVL 14

Author Comment

by:p_partha
ID: 19594515
Looks like you cannot change the "From" field programmatically :((

- Partha
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 19595129
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
 
LVL 31

Expert Comment

by:qwaletee
ID: 19605362
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
 
LVL 14

Author Comment

by:p_partha
ID: 19608337
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
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 19609318
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
 
LVL 31

Expert Comment

by:qwaletee
ID: 19616802
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
 
LVL 14

Author Comment

by:p_partha
ID: 19616931
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
 
LVL 14

Author Comment

by:p_partha
ID: 19616986
also qwal, copyallitems second parameter is false, so doesn't overwrite any of the already existing fields

Partha
0
 
LVL 31

Assisted Solution

by:qwaletee
qwaletee earned 500 total points
ID: 19619238
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
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 19630592
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question