I am using simple MAPI in program on windows platform. The program basically grabs the "To" email address, subject and body from the database and that all works fine. The email gets sent using the default account on that machine set up through Outlook which essentially talks to Exchange Server.

I tried to set up the "FROM" email using MAPI in my code, to be some other email address that does not exist in my Outlook, and for some reason it gets overwritten by the default email address set up in my Outlook.

Is this a security thing that needs to be set up in Outlook and/or Exchange Server?

Can you help me with this.

I am using the following structures from MAPI:

typedef struct {
ULONG ulReserved;
LPTSTR lpszSubject;
LPTSTR lpszNoteText;
LPTSTR lpszMessageType;
LPTSTR lpszDateReceived;
LPTSTR lpszConversationID;
FLAGS flFlags;
lpMapiRecipDesc lpOriginator;
ULONG nRecipCount;
lpMapiRecipDesc lpRecips;
ULONG nFileCount;
lpMapiFileDesc lpFiles;
} MapiMessage, FAR *lpMapiMessage;

typedef struct {
ULONG ulReserved
ULONG ulRecipClass;
LPTSTR lpszName;
LPTSTR lpszAddress;
} MapiRecipDesc, FAR *lpMapiRecipDesc;