title: Spring XD - Mail as Sink or Source
body: <p>I have been trying to ingest data from <strong>Mail</strong> to <strong>File</strong> using Spring XD. Although the creation of the stream comes out to be successful, no output file is created in the process.</p>
  
  <p><strong>The command I used is as follows:</strong></p>
  
  <pre><code>xd:&gt;stream create mailtest --definition "mail --username=myemail%40gmail.com --password=mypassword --host=imap.gmail.com --delete=false --port=993 --outputType=text/plain | file" --deploy
  </code></pre>
  
  <p>What can I do to fix this?</p>
  
  <p>Moreover, the same problem is occurring when I use <strong>Mail</strong> as <strong>Sink</strong>. In the example I did, I  used <strong>HTTP</strong> as my <strong>Source</strong>.</p>
  
  <p><strong>The commands I used are as follows:</strong></p>
  
  <pre><code>xd:&gt;stream create toMail --definition "HTTP | mail --host=imap.gmail.com --to='\"some.email.com@gmail.com\"' --username=myemail%40gmail.com --subject='testing mail' --password=mypassword --port=993 --contentType=text/plain" --deploy
  
  xd:&gt; http post --target http://localhost:9000 --data "hello world!"
  </code></pre>
  
  <p>Your feedback is much appreciated!</p>