Share this page

# Example: mapi_send_mail

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

    //Send a simple mail message

        mapi_send_mail("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("SendMail",
                "To=user1@techno.merc-int.com,user2@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("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("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 );

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: