At first, you need to place a button on the right place.
In your xml that will be returned to outlook, specify the right insertBeforeMso code to make sure your button is where you want it. Also find the right idMso for the tab you putting it to.
Here is an example of putting a button on main ribbon of email message window.
<?xml version="1.0" encoding="utf-8" ?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" >
<ribbon>
<tabs>
<tab idMso="TabNewMailMessage">
<group id="Your ribbon group ID" label="Your button group Label" insertBeforeMso="GroupClipboard">
<button id="Your button ID" label="Your button label" getImage="icon callback" size="large" onAction="click callback" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>