changing email properties

T

Taliesin

I'm using this function to send an email from excel, is their any way to
change the From details so that I can use the department e-mail rather than
my personal one?

Function SendIt(FromEmail, ToEmail, ToCC, ToBCC, ToSubject, ToBody,
ToAttachment)
Set out = CreateObject("Outlook.Application")
Set mapi = out.GetNameSpace("MAPI")
Set email = out.CreateItem(0)
email.Recipients.Add (ToEmail)
email.Subject = ToSubject
email.Body = ToBody
email.Send
Set outlook = Nothing
Set mapi = Nothing
End Function
 
T

Taliesin

Is there no way to "spoof" the sender details so that any replies come back
through a set path?
 
B

Bob Phillips

Taliesin ,

If I am understanding you correctly, isn't that exactly what logon to
another profile does? Not spoofing, but does used that account.
 
T

Taliesin

Main problem is that if I put a password in a macro I breach computer
security rules and get sacked,

Spoofing the address allows me to send the e-mail from my own address
(already logged in) but make it look as if it has come from the department
and redirect all replies that way so that it can be dealt with by anyone on
the shift.
 
B

Bob Phillips

Taliesin,

It would seem to me that you have a legitimate reason there to have a shared
account that anyone on the shift could deal with, and I would suggest that
you put that to your management and seek dispensation. If they say no, then
they maybe don't deserve to have an efficient organisation.

Personally, I would make the case, and if the firm disagrees, go with it. I
definitely would not try to spoof anything in order to circumvent company
policy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top