I'am sorry, I wants to create a form for sending emails by attaching files. How to code it step by step on xamarin android? Thanks
You can use Xam.Plugins.Messaging to achieve this function.
And you can start with: https://github.com/cjlotz/Xamarin.Plugins/blob/master/Messaging/README.md
You can refer to the following code, and I also put a demo in the attachment, you can check it.
private void Button_Clicked(object sender, EventArgs e)
var name = "Jack";
var address = ViewModel.SelectedItem.Address;
var emailMessenger = CrossMessaging.Current.EmailMessenger;
var emailWithHtmlBody = new EmailMessageBuilder()
.BodyAsHtml(htmlBody: "Name:" + name + "Pickup Location: " + address
Thank You @jezh , it work properly.
Happy coding and have a nice day
It's my pleasure to help you. Have a nice day!
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies