MAPI in C

I want to write a simple Email client that will allow my software to Generate a report and Fax it via an email interface to a Fax Server or Simply Email it to a normal email address. I am writing in Normal C (not C++). Where should I start. Are there any simple examples.
LVL 1
philsmicronetAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vachoohoCommented:
see MAPI.h header file
0
cdesignerCommented:
this sample open new mail with attachment



void SendMail(LPCSTR path)
{
    m_hInstMail = ::LoadLibrary("MAPI32.DLL");

    ULONG (PASCAL *lpfnSendMail)(ULONG, ULONG, MapiMessage*, FLAGS, ULONG);
    (FARPROC&)lpfnSendMail = GetProcAddress(m_hInstMail, "MAPISendMail");
        if (lpfnSendMail == NULL)
        {
                OnError("MAPI: Inicialization error");
                ::FreeLibrary(m_hInstMail);
                return;
        }

     // prepare the file description (for the attachment)
     MapiFileDesc fileDesc;
     memset(&fileDesc, 0, sizeof(fileDesc));
     fileDesc.nPosition = (ULONG)-1;
     fileDesc.lpszPathName = path;
     // prepare the message (empty with 1 attachment)
     MapiMessage message;
     memset(&message, 0, sizeof(message));
     message.nFileCount = 1;
     message.lpFiles = &fileDesc;
     int nError = lpfnSendMail(0, (ULONG)NULL,&message, MAPI_LOGON_UI|MAPI_DIALOG, 0);
     if (nError != SUCCESS_SUCCESS && nError != MAPI_USER_ABORT && nError != MAPI_E_LOGIN_FAILURE)
     {
             OnError("MAPI: send message error");
     }
     ::FreeLibrary(m_hInstMail);
}
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.