mailDoc.Reply?

I have been testing examples found on the forum that describes how to read & send emails with LS. The example I’m using now indicates this statement: mailDoc.Principal = |“text here”<info@mydomain.com@mydomain.com>|mailDoc.ReplyTO = “info@mydomain.com

My problem is that LS does not recognize the mailDoc.ReplyTo, nor does it understand mailDoc.Principal. I can do the following: maildoc.send, mailDoc.Responses, mailDoc.Save and numerous others…but as stated above, no choice for mailDoc.ReplyTo or mailDoc.Principal.

Thanks for any thoughts on this.

Subject: mailDoc.Reply??

What do you mean by “does not recognize”?

Subject: RE: mailDoc.Reply??

Below is the example I am working from, notice the bottom 2 lines “mailDoc.Principal” and “mailDoc.replyto”. The statement mailDoc.replyto is red, as if LS does not understand mailDoc.replyto. Also, when I type mailDoc. a box appears giving me all the methods allowed with mailDoc. and principal & replyto are not listed. I have numerous other choices, but not those. (I’ve included the code example only up to the point of problems…)

Sub Click(Source As Button)

Dim session As New NotesSession 

Dim db As Notesdatabase

Dim maildoc As notesdocument 

Dim newLine As String

Dim MsgBody As String

Dim MsgBody1, MsgBody2 As String

Dim newMsgBody1, URL, newMsgBody2 As string

Dim tmpBodyItem1, tmpBodyItem2 As NotesRichTextItem

Const MAX_LINE_WIDTH = 60 



'init

newLine = Chr(13)

Set db = session.CurrentDatabase 

Set mailDoc = db.CreateDocument 'mail doc 



'top part of the letter 

MsgBody1 = "Dear John Doe," + newLine + newLine 

MsgBody1 = MsgBody1 + "Please indicate whether you are available for the speaker request." 

MsgBody1 = MsgBody1 + "Below are the details of the request:" 

MsgBody1 = MsgBody1 + newLine + newLine 

MsgBody1 = msgBody1 +  "A speaker request for you has been submitted 3 days ago."

MsgBody1 = MsgBody1 + "The requesting organization is Test 6.  The requesting person is Test, User 6."

MsgBody1 = MsgBody1 + "The request ID is SBReq114"

MsgBody1 = MsgBody1 + newLine + newLine 

MsgBody1 = MsgBody1 + "Please click on the following URL for request detail and please indicate your response." 

MsgBody1 = MsgBody1 + newLine + newLine



'construct top portion of the letter and have the content wrapped in 60 char 

Set tmpBodyItem1 = mailDoc.CreateRichTextItem("tmpBody1")

Call tmpBodyItem1.appendtext(MsgBody1)

newMsgBody1 = tmpBodyItem1.getformattedtext(False, MAX_LINE_WIDTH)

Call mailDoc.RemoveItem("tmpBody1")



 	

'bottom part of the letter 

MsgBody2 = newLine + newLine + "Regards," + newLine 

MsgBody2 = MsgBody2 + newLine 

MsgBody2 = MsgBody2 + "USA Company" + newLine 

MsgBody2 = MsgBody2 + "http://www.mydomain.com" + newLine 



'construct bottom portion of the letter  

Set tmpBodyItem2 = mailDoc.CreateRichTextItem("tmpBody2")

Call tmpBodyItem2.AppendText(MsgBody2)

newMsgBody2 = tmpBodyItem2.GetFormattedText( False, MAX_LINE_WIDTH)

Call maildoc.RemoveItem("tmpBody2")



MsgBody = newMsgBody1 +  newMsgBody2 

	 

mailDoc.Principal = |"Speaker Request"<info@mydomain.com@mydomain.com>|

mailDoc.Reply to = "info@mydomain.com"

Subject: RE: mailDoc.Reply??

mailDoc.Reply to = “info@mydomain.com

The problem in this case is that you’ve got an extra space. It should be mailDoc.Replyto (no space between Reply and to). ReplyTo and Principal aren’t on the list of methods and properties because they’re not built-in properties of a NotesDocument. They’re just fields which, like SendTo and CopyTo, happen to receive special treatment under certain circumstances.

Subject: Perhaps because of the space between the y and t: mailDoc.Reply to = “info@mydomain.com

Subject: RE: Perhaps because of the space between the y and t: mailDoc.Reply to = “info@mydomain.com

Oh my…I just needed another set of “eyes”…yes the space was definitely my problem, and the example does not show the space that I had included. Also, since REPLYTO and PRINCIPAL was not on the list of properties, it was confusing to me. Thanks for the help in pointing out this problem! Diane

Subject: RE: mailDoc.Reply??

Make these changes as noted below:

mailDoc.Principal = “Speaker Request”

mailDoc.Reply to = “Speaker Request”

That is all you need to do.

Subject: mailDoc.Reply??

without you posting all of your code and the context of how it is being called, it is impossible to know why it is not working, because it SHOULD work.