Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

Send email and attach a text file as attachment in mail client from Shared code in Xamarin.Forms

$
0
0

Hi, I'm using the Xamarin.Forms, and I have used "Device.OpenUri" to open the default email client in android. Is there any way to add the attachment?.
The code which I have used to open mail client is given below.
Device.OpenUri(new Uri("mailto:XXX@YYY.com?subject=MySubject&body=MyFile&attachment='"+filePath+"'"));

The problem I'm facing is the file (which is given as file path) is not attached. It will very helpful if someone point me a solution or a provide me some sample code.

Thanks in advance.


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>