0

I have some questions about sending email messages from Windows Store Apps (Windows 8.1, C#, Visual Studio 2013).

I need to:

  • set recipient email address
  • set subject
  • set HTML content
  • attach files

I am using Data Transfer Manager (https://msdn.microsoft.com/library/windows/apps/br205932) to send mails with subject, HTML content and attached files. But I can't find the way to set recipient email address.

If I don't need to set HTML content and attach files, then I can use mailto to set recipient, subject and text content. Another advantage of mailto is calling MS Outlook. But there is no way to set HTML content and, what is more important - attach files.

My questions are:

  1. How to set recipient email address, if I use Data Transfer Manager?
  2. Is there another way to send mails from Windows Store Apps, to be able to set recipient, subject, HTML content and attach files?

1 Answer 1

1

If you are looking to send email with multiple attachment this sample for windows store app, this code should get you send email with.

  • set recipient email address
  • set subject
  • set HTML content
  • attach Multiple files

Allow less secure app Access to send Email From Gmail Account.

Click on View Raw link on Github to download Sample app.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for your answer! You said: "If you are looking to send email with multiple attachment.." Does it change anything, if I am ok with one attachment? (because it would be better to use MS Outlook)
@VictoriaO. if you want to send multiple attachment just simply add multiple file to List<string> myfilelist = new List<string>(); myfilelist.Add(file.Path);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.