-1

I use the following sample to sent a simple email.

https://learn.microsoft.com/en-us/xamarin/essentials/email?tabs=android

The first time when I run xamarin forms app and call the sent method the popup with apps for selection appeared.

I selected Viber for testing, nothing happened but now i can't undo this selection. Every time when i call the send mail the viber opened.

I tried to clear the app data from the settings and unistall-install the app again but i have the same problem.

How can i fix it ? Can i open a dialog with only email clients ?

Thanks !!

G.Mich
  • 1,607
  • 2
  • 24
  • 42
  • Settings-> Apps-> Viber-> Under the apps settings section clear the settings and now the send method asked me again. Now i want keep in the dialog only mail clients and remove viber,messenger and similar apps – G.Mich Jun 15 '19 at 21:21

1 Answers1

2

I replace Xamarin.Essential email implementation

var message = new EmailMessage
{
                Subject = subject,
                Body = body,
                To = recipients
};
await Email.ComposeAsync(message);

with

Device.OpenUri(new Uri("mailto:test@test.com?subject=test&body=test"));

Now the dialog has only the available mail clients.

G.Mich
  • 1,607
  • 2
  • 24
  • 42