2011-11-10 3 views
0

메일을 보내지 만 첨부 파일이 나타나지 않습니다.Android와 함께 이메일로 파일을 보내는 방법

{ 
     Intent mailIntent = new Intent(Intent.ActionSend); 
     mailIntent.SetType("text/csv"); 

     mailIntent.PutExtra(Intent.ExtraEmail, new string[]{"[email protected]"}); 
     string path = root + nameFile; 


     mailIntent.PutExtra(Intent.ExtraStream, Android.Net.Uri.Parse (@"file:/" + path)); 

     StartActivity(Intent.CreateChooser(mailIntent, "Send mail...")); 
} 

답변

-1
 Intent mailIntent = new Intent(Intent.ActionSend); 
     mailIntent.SetType("text/csv"); 

     mailIntent.PutExtra(Intent.ExtraEmail, new string[]{"[email protected]"}); 
     //string path = root + nameFile; 

     mailIntent.PutExtra(Intent.ExtraStream, Android.Net.Uri.Parse("file:///sdcard/ejemplo.csv")); 

     StartActivity(Intent.CreateChooser(mailIntent, "Send mail...")); 
관련 문제