Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send e-mail from different mailbox

Status
Not open for further replies.

wincey

Technical User
Jan 7, 2002
3
GB
Hello,

I have successfully programmed my database to generate an email, however I have one problem. Our users have their own personal mailbox as the main one, but then they have additional mailboxes which are generic departmental ones. They want the database to send an email from the additional mailbox and not the main one. I know you can do it manually by clicking from and adding the address, but I can't find any way to program it in. There is no option like .from like there is with .to or .CC! There are a couple of options I have tried such as replyrecipients but it doesn't seem to want to let you program this in in case it is a virus! Can anyone help with a way around this so that I can send the email from the additional mailbox or possibly a different email profile?

Many thanks!
 
How are you sending the email from within Access? Tell us that as a starting point - paste your code in this thread, and surely at least one of us can help from there.

I do remember that for at least one method, you can specify every detail, including the "From:" field.

--

"If to err is human, then I must be some kind of human!" -Me
 
What mail client are you using????

If your using Lotus Notes then amend the line

getdatabase("","")

to getdatabase("<server>","<FileName>") to change the mailbox.
 
try using SentOnBehalfOfName, your email security may not let you use another users address or name. I set up some routines to email invoices from our billing department, but the exchange rules for our company blocked me from doing that. So, we just put the simple app on the person's machine that needed to send these out.
 
Again it really depends on the mail client your using.

In Notes GetDatabase("<Server Name>,<FileName>) will change the mailbox that the email is created in. If you just want the mail to look like it has come from someone else then you can use the following when setting the mail up

Code:
.ReplaceItemValue "From",<Required Name>
.ReplaceItemValue "DisplayFrom",<Required Name>
.ReplaceItemValue "ReplyTo",<Required Email Address>

Hope that helps (if your using Notes that is.)
 
Wincey,

can you show us your code.

I am trying to setup code in msaccess 2003 to send an email and have had no success.

I posted my code last night.

Thanks in advance.

Jeff - Toptech



Top Tech Systems

If you help 3 people and each one of those help 3 other people and so on, imagine all the people being helped.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top