Consulting

Results 1 to 6 of 6

Thread: Solved: can the 'from' user be hardcoded?

  1. #1

    Solved: can the 'from' user be hardcoded?

    i have vba code i run from excel which creates emails. however, the emails show the 'from' person as me, but i want it to show the name of another mailbox. is this possible?
    Pam White
    Highpoint Health System
    pam.white@lpnt.net

  2. #2
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    That would fall in the category of "Spoofing" email. And yes it's quite doable. Unfortunately it's a no-no for this particular board.
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

  3. #3
    oops. shows you how dumb i am. If certain users share a mailbox, can they somehow open that mailbox, then run their excel code and it pick up the mailbox name?

    Quote Originally Posted by Oorang
    That would fall in the category of "Spoofing" email. And yes it's quite doable. Unfortunately it's a no-no for this particular board.
    Pam White
    Highpoint Health System
    pam.white@lpnt.net

  4. #4
    i got this from another forum user: "You will have to sign in to that profile, the oNameSpace.Logon is where you do that." is that something i can do or is that spoofing too?



    Quote Originally Posted by pdeshazier
    oops. shows you how dumb i am. If certain users share a mailbox, can they somehow open that mailbox, then run their excel code and it pick up the mailbox name?
    Pam White
    Highpoint Health System
    pam.white@lpnt.net

  5. #5
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    The logon method requires a username, password, and an already established profile on the machine. Presumably if all that is present then it's not spoofing. Although I would strongly encourage you to prompt for the password rather than hardcoding it. I'd by happy to help you with that if you need it.

    However it seems to me that it would be a little bit easier to configure the permissions of the person you want to send it as so you can just use the mail item's MailItem.SentOnBehalfOfName property. Another approach would be to use the ReplyTo feature (MailItem.ReplyRecipients.Add). This will still show as from you, but when the recipient clicks reply, rather than your email being pre-filled, the ReplyRecients is. This is actually what our dept uses as it does not require the creation of a group mailbox or special configuration.
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

  6. #6

    Wink

    thanks for the alternatives. i'll try one of those and mark this as solved for now. i REALLY appreciate your help!!!

    Quote Originally Posted by Oorang
    The logon method requires a username, password, and an already established profile on the machine. Presumably if all that is present then it's not spoofing. Although I would strongly encourage you to prompt for the password rather than hardcoding it. I'd by happy to help you with that if you need it.

    However it seems to me that it would be a little bit easier to configure the permissions of the person you want to send it as so you can just use the mail item's MailItem.SentOnBehalfOfName property. Another approach would be to use the ReplyTo feature (MailItem.ReplyRecipients.Add). This will still show as from you, but when the recipient clicks reply, rather than your email being pre-filled, the ReplyRecients is. This is actually what our dept uses as it does not require the creation of a group mailbox or special configuration.
    Pam White
    Highpoint Health System
    pam.white@lpnt.net

Posting Permissions

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