How can MAPI VB set the "From" Email addr in Outlook/Outlook

I have a VB5 Program that sends Emails to customers from various salespeople. 
 If I change either Outlook or Outlook Express to have a different email 
address for each salesperson, how can I automatically insert the 
salesperson's Email address in the "From" Address in the Email automatically 
generated by my VB program.

Currently the "From" email address is determined by whoever logged onto 
either Outlook/Outlook Express last.

Also, I want Outlook to immediately send the Email without waiting for 
someone to log onto Outlook and click the Send/Receive button?

Would really appreciate your help with this. 
0
Utf
1/22/2010 2:43:02 PM
vb.general.discussion 1016 articles. 0 followers. Follow

5 Replies
1451 Views

Similar Articles

[PageSpeed] 36

On Fri, 22 Jan 2010 06:43:02 -0800, Dennis Rose
<DennisRose@discussions.microsoft.com> wrote:

>I have a VB5 Program that sends Emails to customers from various salespeople. 
> If I change either Outlook or Outlook Express to have a different email 
>address for each salesperson, how can I automatically insert the 
>salesperson's Email address in the "From" Address in the Email automatically 
>generated by my VB program.
>
>Currently the "From" email address is determined by whoever logged onto 
>either Outlook/Outlook Express last.
>
>Also, I want Outlook to immediately send the Email without waiting for 
>someone to log onto Outlook and click the Send/Receive button?
>
>Would really appreciate your help with this. 
Outlook should send emails immediately, it does from our work PCs, using
only the signed on Outlook user. 

To spoof email addresses you will be better off using something else to
send, still using MAPI though. I can't remember what it is we use at work,
but it was a freebie.

Your outgoing exchange server will need to be configured to allow that
particular computer (or is it the sign on?) the ability to spoof it's email
address within the company domain range (ie Any email address in the
@mycompany.com range).

Richard
-- 
http://www.caravanningnow.co.uk
When I was a kid, all we had to do was just sit around and hope
somebody would invent television so we could play Nintendo.
0
Richard
1/22/2010 4:58:06 PM
On Fri, 22 Jan 2010 16:58:06 +0000, Richard Cole
<ispcrco@hotmail.com.invalid> wrote:

>On Fri, 22 Jan 2010 06:43:02 -0800, Dennis Rose
><DennisRose@discussions.microsoft.com> wrote:
>
>>I have a VB5 Program that sends Emails to customers from various salespeople. 
>> If I change either Outlook or Outlook Express to have a different email 
>>address for each salesperson, how can I automatically insert the 
>>salesperson's Email address in the "From" Address in the Email automatically 
>>generated by my VB program.
>>
>>Currently the "From" email address is determined by whoever logged onto 
>>either Outlook/Outlook Express last.
>>
>>Also, I want Outlook to immediately send the Email without waiting for 
>>someone to log onto Outlook and click the Send/Receive button?
>>
>>Would really appreciate your help with this. 
>Outlook should send emails immediately, it does from our work PCs, using
>only the signed on Outlook user. 
>
>To spoof email addresses you will be better off using something else to
>send, still using MAPI though. I can't remember what it is we use at work,
>but it was a freebie.

Remembered, it's the VBSendMail.dll. It should work from VB5 and it's easy
to use.

>Your outgoing exchange server will need to be configured to allow that
>particular computer (or is it the sign on?) the ability to spoof it's email
>address within the company domain range (ie Any email address in the
>@mycompany.com range).
>
>Richard
-- 
http://www.caravanningnow.co.uk
When I was a kid, all we had to do was just sit around and hope
somebody would invent television so we could play Nintendo.
0
Richard
1/22/2010 5:00:21 PM
Dennis Rose <DennisRose@discussions.microsoft.com> wrote:

> If I change either Outlook or Outlook Express to have a different email 
>address for each salesperson, how can I automatically insert the 
>salesperson's Email address in the "From" Address in the Email automatically 
>generated by my VB program.

My answer is only for Outlook but maybe that'll give you a clue.

 olItem.SentOnBehalfOfName = "reportingteam@xxx.com"

If you're running on Exchange you might need that account to allow
your Outlook account permission to do so.  Or some similarly named
setting.  

Tony
-- 
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files 
  updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
0
Tony
1/22/2010 7:36:12 PM
Tony,
Thanks for the help.
Where would I insert such code.  I'm new at this email/Outlook interface 
problem.


"Tony Toews [MVP]" wrote:

> Dennis Rose <DennisRose@discussions.microsoft.com> wrote:
> 
> > If I change either Outlook or Outlook Express to have a different email 
> >address for each salesperson, how can I automatically insert the 
> >salesperson's Email address in the "From" Address in the Email automatically 
> >generated by my VB program.
> 
> My answer is only for Outlook but maybe that'll give you a clue.
> 
>  olItem.SentOnBehalfOfName = "reportingteam@xxx.com"
> 
> If you're running on Exchange you might need that account to allow
> your Outlook account permission to do so.  Or some similarly named
> setting.  
> 
> Tony
> -- 
> Tony Toews, Microsoft Access MVP
> Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
> Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
> For a convenient utility to keep your users FEs and other files 
>   updated see http://www.autofeupdater.com/
> Granite Fleet Manager http://www.granitefleet.com/
> .
> 
0
Utf
1/22/2010 8:38:07 PM
Dennis Rose <DennisRose@discussions.microsoft.com> wrote:

>Thanks for the help.
>Where would I insert such code.  I'm new at this email/Outlook interface 
>problem.

This would only work if you were using Outlook which you aren't.  My
point though is the Outlook terminology is "on behalf of" and that you
need to grant permissions from the other email account.  Maybe there's
something similar in MAPI.

Tony
-- 
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files 
  updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
0
Tony
1/23/2010 4:13:28 AM
Reply:

Similar Artilces: