title: How to apply <base64-encoder-transformer/> on message.OutboundAttachment in Mule
body: <p>I have a base64Binary encoded file(eg:pdf,img,doc). In Mule I'm setting this encoded data as an outBoundAttachment to eventually send it as attachments using SMTP. How to decode or apply decoding transformer only to the outbound attachment and send it in smtp.</p>
  
  <pre><code>&lt;set-attachment attachmentName="xml.pdf" value="#[flowVars['pdf']]" contentType="application/pdf" doc:name="Attachment"/&gt;
  &lt;base64-decoder-transformer /&gt;
  &lt;string-to-byte-array-transformer /&gt;
  &lt;smtp:outbound-endpoint host="smtp.gmail.com" user="${username}" password="${pwd}"  connector-ref="smtpConnector" to="${toAddress}"  from="${fromAddress}" mimeType="text/html" subject="This is sample from mule"   responseTimeout="10000" doc:name="SMTP"&gt;
   &lt;email:object-to-mime-transformer useOutboundAttachments="true"/&gt;
   &lt;/smtp:outbound-endpoint&gt; 
  </code></pre>
  
  <p>Currently I'm getting:</p>
  
  <pre><code>'Failed to transform from "base64" to "org.mule.transformer.types.SimpleDataType"'
  'Bad Base64 Input character at 0:60(decimal)'
  </code></pre>