| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| I am contracted with an organization that uses Lotus Notes. Unforunately, I have zero experience with it. My task is to automate the production of some Crystal reports and then email them via Notes. That much I have done. Now, I'll try to explain the problem. The emails are sent from a workspace mailbox that is not mine (not sure is the jargon si correct). I can open it and look at the Sent folder. The mail items show up as they should. Here's the issue -- when I open the Sent folder and look at a message I created in code, the From field shows my name. That's Ok. But when another person opens the sent folder and looks at the message, it shows their name as the From address. Oddly, when any recipient opens the message in their own inbox the From address is consistently mine. Here is the pertinent part of my code. Set MailDoc = MailDb.CreateDocument With MailDoc .Form = "Memo" .SendTo = SendTo ' an array of addresses .CopyTo = CopyTo ' an array of addresses .Principal = "Something other than me" .Subject = Subject ' var holding subject line .Body = Body ' var holding body text .SaveMessageOnSend = True .PostedDate = Now() 'Gets the mail to appear in the sent items folder .Send False End With Does anyone know of a way to set the From address -- or, at least, make sure that it always shows the name of the sender no matter who opens it? Thanks. |
|
#2
|
| I'm guessing that there is no "From" field due to the way the message is being mailed from VB. The copy the users get has a "From" field because Notes puts it there. You could try saving a "From" field after the message has been sent. Tim Mohrlant sebair-at-gmail.com wrote: > I am contracted with an organization that uses Lotus Notes. > Unforunately, I have zero experience with it. My task is to automate > the production of some Crystal reports and then email them via Notes. > That much I have done. Now, I'll try to explain the problem. > > The emails are sent from a workspace mailbox that is not mine (not > sure is the jargon si correct). I can open it and look at the Sent > folder. The mail items show up as they should. Here's the issue -- > when I open the Sent folder and look at a message I created in code, > the From field shows my name. That's Ok. But when another person > opens the sent folder and looks at the message, it shows their name as > the From address. > > Oddly, when any recipient opens the message in their own inbox the > From address is consistently mine. > > Here is the pertinent part of my code. > > Set MailDoc = MailDb.CreateDocument > > With MailDoc > > .Form = "Memo" > .SendTo = SendTo ' an array of addresses > .CopyTo = CopyTo ' an array of addresses > .Principal = "Something other than me" > .Subject = Subject ' var holding subject line > .Body = Body ' var holding body text > .SaveMessageOnSend = True > > .PostedDate = Now() 'Gets the mail to appear in the sent items > folder > .Send False > > End With > > > Does anyone know of a way to set the From address -- or, at least, > make sure that it always shows the name of the sender no matter who > opens it? > > Thanks. > |
|
#3
|
| For sending email from notes mail UI, there is a 'From' preset at the memo form. Since you are using the backend mehtod, you need to update the 'From' field as the current username. If you check the tmpDisplaySentBy field of the Memo form, you will find that the design will try to use current username if there are no Form field at the document. You may update the code as, > Here is the pertinent part of my code. > > * * Set MailDoc = MailDb.CreateDocument > > * * With MailDoc > > * * * * .Form = "Memo" .From = sess.commonusername ' where sess is the notessession you created > * * * * .SendTo = SendTo * * * * * * ' an array of addresses > * * * * .CopyTo = CopyTo * * * * * * ' an array of addresses > * * * * .Principal = "Something other than me" > * * * * .Subject = Subject * * * * * * ' var holding subject line > * * * * .Body = Body * * * * * * * * * *' var holding body text > * * * * .SaveMessageOnSend = True > > * * * * .PostedDate = Now() 'Gets the mail to appear in the sent items > folder > * * * * .Send False > > * * End With |
![]() |
| Thread Tools | |
| Display Modes | |