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

How do I send an email using Xamarin.Essentials with an attachment from a memory file?

$
0
0

The subject line says it all really: how do I send an email using Xamarin.Essentials.EmailMessage with an attachment from a memory file?

I found this code on SO that does it for 'normal' .NET: [https://stackoverflow.com/questions/5336239/attach-a-file-from-memorystream-to-a-mailmessage-in-c-sharp](Email File From MemoryStream). But I am not sure how to map this onto the Xamarin.Essentials.EmailMessage class because of the way the Mime type is constructed.

Can anyone offer any advice or suggestions?

Incidentally, the file I am attaching is for the foreseeable future (famous last words) text-only. So a solution or workaround that works for text would be great!

Kind wishes - Patrick


Viewing all articles
Browse latest Browse all 77050

Trending Articles