这会发送邮件,但不会显示附件。
{
Intent mailIntent = new Intent(Intent.ActionSend);
mailIntent.SetType("text/csv");
mailIntent.PutExtra(Intent.ExtraEmail, new string[]{"rommyce@hotmail.com"});
string path = root + nameFile;
mailIntent.PutExtra(Intent.ExtraStream, Android.Net.Uri.Parse (@"file:/" + path));
StartActivity(Intent.CreateChooser(mailIntent, "Send mail..."));
}
答案 0 :(得分:-1)
Intent mailIntent = new Intent(Intent.ActionSend);
mailIntent.SetType("text/csv");
mailIntent.PutExtra(Intent.ExtraEmail, new string[]{"xxxxxxr@hotmail.com"});
//string path = root + nameFile;
mailIntent.PutExtra(Intent.ExtraStream, Android.Net.Uri.Parse("file:///sdcard/ejemplo.csv"));
StartActivity(Intent.CreateChooser(mailIntent, "Send mail..."));