In this flow you are using multiple outbounds. The flow doesn't wait for the response of the smtp and still continues with the next out-bound.
A condition can be added to check whether the smtp was successful before proceeding with the out-bound.
The modified flow looks like this. Try this.
<flow name="sample-flowFlow1" doc:name="sample-flowFlow1">
<inbound-endpoint ref="inboundEndpoint" doc:name="AMQP Consumer"/>
<flow-ref name="mailingFlow" ></flow-ref>
<choice>
<when expression="#[flowVars['mailingSuccess'] == 'failure']">
<logger level="INFO" message="Mailing failed"></logger>
</when>
<otherwise>
<outbound-endpoint ref="outboundEndpoint" doc:name="AMQP Publisher"/>
</otherwise>
</choice>
</flow>
<flow name="mailingFlow" processingStrategy="synchronous" >
<smtp:outbound-endpoint host="foobaz" to="test@example.com" from="test@example.com" subject="test" responseTimeout="10000" doc:name="SMTP"/>
<catch-exception-strategy name="FailureNotification">
<set-variable variableName="mailingSuccess" value="failure" ></set-variable>
<flow-ref name="FailureNotificationFlow" doc:name="Flow Reference" />
</catch-exception-strategy>
</flow>
<sub-flow name="FailureNotificationFlow" doc:name="FailureNotificationFlow">
<outbound-endpoint ref="failureEndpoint" doc:name="Failure Endpoint"/>
</sub-flow>
Hope this helps