public static ContactEmailAddress Create(WinRtEmail a) { if (a == null) { return(null); } return(new ContactEmailAddress() { EmailAddress = a.Address, Kind = ConvertEmailKind(a.Kind), Accounts = new Account[0] //TODO }); }
private async void EmailButton_Click(object sender, RoutedEventArgs e) { var emailMessage = new Windows.ApplicationModel.Email.EmailMessage(); emailMessage.Body = this.VersionText.Text; var email = new Windows.ApplicationModel.Contacts.ContactEmail() { Address = "*****@*****.**" }; if (email != null) { var emailRecipient = new Windows.ApplicationModel.Email.EmailRecipient(email.Address); emailMessage.To.Add(emailRecipient); emailMessage.Subject = string.Format("{0} {1}", Support_Link_Email.Content.ToString(), DateTime.Now.ToString()); } await Windows.ApplicationModel.Email.EmailManager.ShowComposeNewEmailAsync(emailMessage); }
private async void ComposeEmail() { var contact = new Windows.ApplicationModel.Contacts.Contact(); contact.Name = "Montse"; var contactEmail = new Windows.ApplicationModel.Contacts.ContactEmail(); contactEmail.Address = "*****@*****.**"; contact.Emails.Add(contactEmail); var emailMessage = new Windows.ApplicationModel.Email.EmailMessage(); emailMessage.Body = "Intruder alert in NeoPixel Security"; emailMessage.Subject = "Intruder Alert!"; var email = contact.Emails.FirstOrDefault <Windows.ApplicationModel.Contacts.ContactEmail>(); if (email != null) { var emailRecipient = new Windows.ApplicationModel.Email.EmailRecipient(email.Address); emailMessage.To.Add(emailRecipient); } await Windows.ApplicationModel.Email.EmailManager.ShowComposeNewEmailAsync(emailMessage); }