467,219 Members | 1,438 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,219 developers. It's quick & easy.

Access Lotus Notes Email, Changing Sent By Name

I'm not a Lotus Notes developer but thanks to this group's archives
have successfully created a function for sending Lotus Notes emails
from Access.
The follow code works great except I want to remove my name from the
'Sent By' portion of the email.

These messages are sent using my client session of Lotus Notes, using
a database called 'Tech Team' The resulting email message headers
contains
(Bold, the From name) 'Tech Team'
(non-bold) Sent by: <my name> (this is what I want
to remove)
(non-bold) 'Please respond to Tech Team'

This application send automails to employees in my company for a
specific web application and I'm not the person they should be
directing their questions to. (Nor have I been successful in
persuading the Notes administrators to setup a separate Notes account
for us.)

When I manually send a message, in Lotus Notes, from this Tech Team
database, that 'Sent By' message doesn't appear on the recepient's
copy of the email. So know it can be done; the question is how can
this be done in Access?
-------------------------------------
Public Function LN_EmailMsgSend (pSendTo As String, pSendCC As String,
pSubject As String, pMessage As String, pPassword As String) As
Boolean

Dim domMailDB As NotesDatabase
Dim domSession As notesSession
Dim domMailDoc As NotesDocument
Dim domRTI As NotesRichTextItem
Dim domStyle As NotesRichTextStyle

Dim sServerName As String
Dim sDB_FileName As String
Dim sSendTo() As String
Dim sSendCC() As String

sServerName = Get_LNotes_ServerName()
sDB_FileName = Get_LNotesDB_File()
sSentBy = Get_SenderName()

' Move the SendTo and SendCC comma delimited addresses, into string
arrays

ParseAddresses sSendTo, pSendTo, iAddressCnt
ParseAddresses sSendCC, pSendCC, iAddressCnt
Set domSession = CreateObject("Lotus.NotesSession")
domSession.Initialize (pPassword)

Set domMailDB = domSession.GetDatabase(sServerName, sDB_FileName)

If domMailDB.IsOpen = False Then
domMailDB.OPENMAIL
End If

Set domMailDoc = domMailDB.CreateDocument

Call domMailDoc.AppendItemValue("SendTo", sSendTo)
Call domMailDoc.AppendItemValue("CopyTo", sSendCC)
Call domMailDoc.ReplaceItemValue("Subject", pSubject)
Call domMailDoc.ReplaceItemValue("PostedDate", Now())
Call domMailDoc.ReplaceItemValue("ReplyTo", sSentBy)
Call domMailDoc.ReplaceItemValue("Principal", sSentBy)
domMailDoc.SAVEMESSAGEONSEND = 1

Set domRTI = domMailDoc.CreateRichTextItem("body")

Set domStyle = domSession.CreateRichTextStyle
domStyle.Bold = 0
domStyle.NotesFont = FONT_HELV
domStyle.FontSize = 10
Call domRTI.AppendStyle(domStyle)

Call domRTI.AppendText(pMessage)

domMailDoc.send 0, sSendTo

End Function
Nov 13 '05 #1
  • viewed: 5306
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by moid | last post: by
2 posts views Thread by DeanL | last post: by
2 posts views Thread by charliej2001@googlemail.com | last post: by
1 post views Thread by Torilyn73 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.