Results 1 to 8 of 8
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Rockville, MD USA
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Email Sender Name (Access 97/2K)

    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

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Email Sender Name (Access 97/2K)

    How are you sending the email in the first place? If you're using Outlook and not using SendObject, you can send mail from a different profile but you can't make up a From address out of nowhere.
    Charlotte

  3. #3
    Lounger
    Join Date
    Jan 2001
    Location
    Rockville, MD USA
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 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?

  4. #4
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Email Sender Name (Access 97/2K)

    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.
    Regards,
    Rory

    Microsoft MVP - Excel

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Email Sender Name (Access 97/2K)

    I believe a Lounge Search on CreateNamespace will turn up previous discussions on how to accomplish this.
    Charlotte

  6. #6
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Royal Oak, Michigan, USA
    Posts
    255
    Thanks
    0
    Thanked 0 Times in 0 Posts

    E-Mail from Public Folder

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

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: E-Mail from Public Folder

    You'll find some examples of how to specify SentOnBehalfOfName in <post:=508,731>post 508,731</post:> and <post:=365,631>post 365,631</post:>. 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

  8. #8
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Royal Oak, Michigan, USA
    Posts
    255
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: E-Mail from Public Folder

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •