We have an application that makes heavy use of the capability to send out email. The application is written in Access, and we use the local Outlook client to send mail through the client's Exchange server. This has worked fine so far.
However we now have a need to send email from the same machine, but make it look like it came from a different account (i.e. email sender). In realtime Outlook, you can define multiple accounts in your Outlook profile and can easily switch between them, so that the From address reflects the underlying account set up.
After hours of searching, it seems that from vba you can control almost everything about an e-mail EXCEPT make it send from a different account.
Any Ideas
Thanks, -Rob

Sending e-mail from within VBA
KevinRobinson
Spotty,
Thanks very much for your very useful reply. I'll make sure I keep a note of these forum links you send me.
Regards, -Rob
Ultrawhack
The VB within Access and Outlook is Visual Basic for Application. VBA is a very different product from VB.NET and there are some other locations where youy will probably get a quicker and better response to your VBA questions.
You may find more assistance in following which specifically deals with VBA development.
http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=74&SiteID=1
Or if you are using VBA from within on of the office applications
Office Automation: office.developer.automation newsgroup
http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.office.developer.automation&lang=en&cr=US
Or the Office Newgroups
http://www.microsoft.com/office/community/en-us/default.mspx d=1
I think you'll find that the reason you cant send an email from a different account is a security reason. I think you have to look at sending email onbehalfof someone.
I'd seen something like this before.
To send emails using outlook
http://support.microsoft.com/ kbid=313803
Looking at a knowledgebase article for Outlook 2000 on this topic and it provides some insight as to the potential security issue - I would think this reasoning still holds true in later versions of outlook.
http://support.microsoft.com/kb/232309
I would suggest looking at the following SendOnBehalfOfName property of the outlook message.
But either way if your using VBA - its off topic for this forum.
Hope that helps