You can do this using Script Mediator a sample is here
Here is another example which sends the error message as the email body and error code as the subject. Here payload factory is used instead of script mediator.
<faultSequence>
<property xmlns:ns="http://org.apache.synapse/xsd" name="ErrorCode" expression="get-property('ERROR_CODE')" scope="default" type="INTEGER"/>
<property name="ErrorMessage" expression="get-property('ERROR_MESSAGE')" scope="default" type="STRING"/>
<property name="messageType" value="text/html" scope="axis2"/>
<property name="ContentType" value="text/html" scope="axis2"/>
<property xmlns:ns="http://org.apache.synapse/xsd" name="Subject" expression="$ctx:ErrorCode" scope="transport"/>
<payloadFactory>
<format>
<ns:text xmlns:ns="http://ws.apache.org/commons/ns/payload">$1</ns:text>
</format>
<args>
<arg expression="$ctx:ErrorMessage"/>
</args>
</payloadFactory>
<property name="OUT_ONLY" value="true"/>
<send>
<endpoint>
<address uri="mailto:youremail@gmail.com"/>
</endpoint>
</send>
</faultSequence>