Is there a way to send email based on an event that uses something like Database Administrator in the from line instead of the name of the person currently logged onto the machine?
TIA
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Email Sender Name (Access 97/2K)
Thank you Charlotte!
Not being able to generate a FROM address out of nowhere answers part of the question.
I am using Outlook and not SendObject. The database will reside on a common server with different people making changes to different forms. When changes happen to significant data, supervisors will be notified so they may take appropriate action. I do not want the email to come from a particular person but rather the “database” itself. i.e. from the Database Administrator not Kirk Lavender.
Would the different profile need to be placed in each user’s Outlook? How would I use the different profile through VBA?
Hi,
Are you using Exchange Server? If so, then I think you need to create a new mailbox for Database Administrator and give SendOnBehalfOf permission for that mailbox to the users of your database. Your code will need to use the Namespace.CreateRecipient and the GetSharedDefaultFolder methods to reference the inbox for the Database Administrator and then send mail from there.
Hope that helps.
Hi Charlotte,
I didn’t find any posts under CreateNamespace and the other post I looked for no longer exists. I have access to a public e-mail box and am hoping there’s a simple way in Access 2003 to send my Access generated e-mail from my public e-mail box (FieldControls2@AnyCorp.com) as opposed to my personal folder. Any other direction would be appreciated.
Thanks!!
You’ll find some examples of how to specify SentOnBehalfOfName in post 508,731 and post 365,631. This will still send the mail from the profile under which you’re currently logged in to Outlook, but with something like “Dashiell on behalf of DBAdmin” in the From box. If you want to send from DBAdmin, look up the Login method of the NameSpace object in the Outlook VBA help. Here is an example from the help subject:
Set myOlApp = CreateObject(“Outlook.Application”)
Set myNameSpace = myOlApp.GetNameSpace(“MAPI”)
myNameSpace.Logon “myProfile”, “myPassword”, True, True
Thanks Hans. The reason I thought it would work by defining the “From” is because that is what I do in Outlook when I send e-mails from the public folder I created. I set the “From” to visible and then select the mailbox I set-up and when the receipient receives the e-mail, it states it’s from my folder and not from me or from my behalf.
As always, thanks a bunch!!
Andrew
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.
Notifications