473,406 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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
0 5593

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Fixem2 | last post by:
I am trying to use the following code to send an email to Lotus Notes from A2K. (Retrieved from Tony's excellent Access Email FAQ.) http://www.fabalou.com/VBandVBA/lotusnotesmail.asp I am...
5
by: Colin Anderson | last post by:
I discovered, with great excitement, this article http://www.davison.uk.net/vb2notes.asp when researching methods for emailing from Access via Notes. Unfortunatly, when I run this I get a...
1
by: moid | last post by:
I want to Email through Lotus Notes Server. Am i right on this that i wont be needing any lotus notes based assembly/dll to email through it I hope i just have to do is that to have smtpserver...
2
by: DeanL | last post by:
Hi Everyone, I'm not sure if this is even possible but I thought I'd ask anyway. I have an Access 97 database that contains construction projects and other associated details and is updated on...
2
by: charliej2001 | last post by:
Hi all I'm trying to set up an Access database that will be able to import contact information from the lotus notes 6.5 Address book. The idea is that the code runs from access to import all of...
1
by: Torilyn73 | last post by:
Ok folks... I apologize now if I'm covering territory already discussed. I'm sick as a dog right now and have got to get some work done on this datbase. Let me explain what I'm trying to do. I...
4
by: MVSGuy | last post by:
Hello, I have a problem where a Notes field shows up in Access (via ODBC connection) but the value is either zero or blank in Access. I've verified the field is not zero or blank in Notes. ...
3
by: Pav | last post by:
Hi, I am developing a small Intranet web application which needs to send mails to our coporate Ids. I am using CDONTS, But my mails never leave Que folder. Not able to find out what the...
4
by: Bob Alston | last post by:
I am trying to access data in a Lotus Notes database, from Access. The Notes database is release R5. I installed NotesSQL 8.x and have it working. However it chokes on one of the tables and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.