I use next code, but I have an exception in this:
FileOutputStream out = new FileOutputStream(pic);
Here is the function I use: "frame" is a Bitmap that token from camera and I show it on ImageView. "pic" is a File.
public void sendEmail(View view) {
    String email = "michael@gmail.com";
    String subject = "frame";
    String message = "This is the frame!";
    try {
        File root = Environment.getExternalStorageDirectory();
        if (root.canWrite()){
            pic = new File(root, "image.jpeg");
            FileOutputStream out = new FileOutputStream(pic);
            frame.compress(Bitmap.CompressFormat.JPEG, 100, out);
            out.flush();
            out.close();
        }
    } catch (IOException e) {
    }
    final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
    emailIntent.setType("image/jpeg");
    emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{email});
    emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
    emailIntent.putExtra(Intent.EXTRA_TEXT, message);
    emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(pic));
    startActivity(Intent.createChooser(emailIntent, "Sending email..."));
}
 
    