Example: mapi_send_mail_ex

In the following example, the mapi_send_mail_ex sends several types of mail messages.

//Send a simple mail message
    mapi_send_mail_ex(&mapi,"SendMail",
            "To=user0001t@techno.merc-int.com",
            "Subject=<GROUP>:<VUID> @ <DATE>",
            "Body=Test Message! Please ignore.",
            LAST );
//Send a Sticky Note message
    mapi_send_mail_ex(&mapi,"SendMail",
            "To=user0001t@techno.merc-int.com,user0010t@techno.merc-int.com",
            "Cc=user0002t@techno.merc-int.com",
            "Bcc=user0003t@techno.merc-int.com",
            "Subject=<GROUP>:<VUID> @ <DATE>",
            "Type=IPM.StickyNote",
            "Body=Please update your profile today.",
            LAST );
//Send mail with Attachments
    mapi_send_mail_ex(&mapi,"SendMail",
            "To=user0001t@techno.merc-int.com",
            "Subject=Attach Test @ <DATE>",
            "Body=Test Message!",
            "ATTACHMENTS",
                "File=E:\\QA\\for_dcom\\vbj_readme.txt", "ENDITEM",
                "File=E:\\QA\\for_dcom\\vbj_readme.txt", "ENDITEM",
            LAST );
//Send mail with Attachment within body
    mapi_send_mail_ex(&mapi, "Mail1",
        "To=user0001t@techno.merc-int.com",
        "Subject=This is a my subject ",
        "Body=This is a sample mail. This is the outfile.",
        "Type=IPM.StickyNote",
        "ATTACHMENTS",
        "Name=AutoExec.bat", "File=c:\\autoexec.bat", "Position=5", "ENDITEM",
        "Name=Outfile.txt", "File=c:\\tmp\\outfile.txt", "Position=30", "ENDITEM",
        LAST );