title: Send email with attachment in Android. Works on Gmail but not on Outlook
body: <p>So from my Android app I can send emails with attachment on Gmail. On outlook looks like it is attaching the file (.txt), but when I open the mail there is no attached file.</p>
  
  <p>This is my code:</p>
  
  <pre><code>final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
  Uri uriFileToShare = Uri.fromFile(file);
  emailIntent.setType("plain/text");
  emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, file.getName());
  emailIntent.putExtra(android.content.Intent.EXTRA_STREAM, uriFileToShare);
  this.startActivityForResult(Intent.createChooser(emailIntent, activity.getString(R.string.send)+" "+file.getName()+" "+activity.getString(R.string.by_email)),code);
  </code></pre>
  
  <p>I have tried different solutions but no result. </p>
  
  <p>The file of course exists and is not empty. As I said, on Gmail is correctly attached.</p>
  
  <p>Any idea?</p>