Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer


Enables the ID_FILE_SEND_MAIL command if mail support (MAPI) is present.

void OnUpdateFileSendMail(
   CCmdUI* pCmdUI 



A pointer to the CCmdUI object associated with the ID_FILE_SEND_MAIL command.

Otherwise the function removes the ID_FILE_SEND_MAIL command from the menu, including separators above or below the menu item as appropriate. MAPI is enabled if MAPI32.DLL is present in the path and, in the [Mail] section of the WIN.INI file, MAPI=1. Most applications put this command on the File menu.

CDocument supports sending your document via mail if mail support (MAPI) is present. See the articles MAPI Topics and MAPI Support in MFC.

© 2015 Microsoft