Paul Webster Messages: 6859 Registered: July 2009 Location: Ottawa
You would do something similar to the Window>Show View menu. Use a menuContribution to contribute a dynamic element, a subclass of org.eclipse.ui.actions.CompoundContributionItem. You can implement org.eclipse.ui.menus.IWorkbenchContribution if you need to get any services.
Your command to send mail would take an optional parameter, i.e. com.example.sendMail would have a parameter named com.example.sendMail.email. A static menu contribution might look like: