By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,257 Members | 2,812 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,257 IT Pros & Developers. It's quick & easy.

Access Lotus Notes Email, Changing Sent By Name

P: n/a
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
(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

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

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
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)

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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.