PDA

View Full Version : Solved: can the 'from' user be hardcoded?



pdeshazier
06-04-2008, 08:57 AM
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?:banghead:

Oorang
06-04-2008, 10:06 AM
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.

pdeshazier
06-04-2008, 12:41 PM
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?:dunno


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.

pdeshazier
06-04-2008, 12:45 PM
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?




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

Oorang
06-04-2008, 03:17 PM
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.

pdeshazier
06-05-2008, 06:14 AM
thanks for the alternatives. i'll try one of those and mark this as solved for now. i REALLY appreciate your help!!!


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.