Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8648327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:17:15+00:00 2026-06-12T13:17:15+00:00

I am using Sharing to send text (string) by email. the data I am

  • 0

I am using “Sharing” to send text (string) by email.

the data I am sharing is created like this:

string data = "Log Data\n" + "========\n";

data += "Log Type   : " + log.LogType.ToString() + "\n";

data += "Date/Time:   " + log.TimeStamp.ToString( "MM/dd/yy - HH:mm:ss" ) + "\n";

data += "Result:      " + log.Result.ToString() + "\n";

data += "Value1:      " + log.Value1 + "     Value2:      " + log.Value2 + "\n";

data += "Note:        " + log.Note + "\n\n";  

the data is prepared and sent in an email. However the “\n” is not interpreted correctly neither before I send (by the Windows 8 mail program) or the receiving side GMail.

The data presented on the send side looks like this:

Log Data ======== Log Type : ToDo Date/Time: 06/05/12 - 08:00:00 Result: Normal Value1: 170 Value2: 0 Note: note 1 

The ShareTextHandler is like this:

DataRequest request = e.Request;

request.Data.Properties.Title = "Share Data: ";

request.Data.Properties.Description = "Send Data to an email address";

request.Data.SetText( data );

Was the “\n” changed in Windows 8? or the SetText does something to remove it?

EitanB

UPdate….

Hi,

Tried to do it with HTML:

Tried some test data with HTML like this:
private string PrepareShareData()
{
string CR = System.Environment.NewLine;
string data = string.Empty;

        data += "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Final//EN\">" + CR;
        data += "<html>" + CR;
        data += "<body>" + CR;
        data += "<p>" + CR;
        data += "Log Data" + "<br/>" + CR;
        data += "========" + "<br/>" + CR;
        data += "Line 1" + "<br/>" + CR;
        data += "Line 2" + "<br/>" + CR;
        data += "<p>" + CR;
        data += "</body>" + CR;
        data += "</html>" + CR;

        return data;
        }

Did not work…

Tried also:

    private string PrepareShareData()
        {
        string CR = System.Environment.NewLine;
        string data = string.Empty;

        data += "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Final//EN\">";
        data += "<html>";
        data += "<body>";
        data += "<p>";
        data += "Log Data" + "<br/>";
        data += "========" + "<br/>";
        data += "Line 1" + "<br/>";
        data += "Line 2" + "<br/>";
        data += "<p>";
        data += "</body>";
        data += "</html>";

        return data;
        }

did not work either….

I did create a .HTML file with the notepad that worked fine:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Final//EN">
<html>
<body>
<p>
Log Data<br/>
========<br/>
Line 1<br/>
Line 2<br/>
</p>
</body>
</html>

Is there a mail problem with HTML too or my HTML is wrong?

Thanks,
EitanB

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T13:17:17+00:00Added an answer on June 12, 2026 at 1:17 pm

    Used:

    var htmlFormat = Windows.ApplicationModel.DataTransfer.HtmlFormatHelper.CreateHtmlFormat( data );
    request.Data.SetHtmlFormat( htmlFormat );
    

    Where data is:

            string data = string.Empty;
            string BR = @"<br/>";
            data += @"<html>";
            data += @"<head><title>";
            data += @"<title>";
            data += @"Log Data<br/>";
            data += @"========<br/>";
            data += @"</title>";
            data += @"</head>";
            data += @"<body>";
            data += @"Date/Time:   " + log.TimeStamp.ToString( "MM/dd/yy - HH:mm:ss" ) + BR;
            data += @"Note:        " + log.Note + BR + BR;
            data += @"</body>";
            data += @"</html>";
    

    too much work to go around Microsoft problem….

    EitanB

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using R for data analysis, and I'm sharing some data with collaborators via
I am developing an app with email sharing. The code I am using to
I am sharing some data across multiple processes by using shared memory; I use
I would like to see what people are sharing from my app. Using Facebook
I am making an application where I want to send an email using smtp
I'm using twitter sharing via TWTweetComposeViewController in my app. When i tried to send
I am using Facebook Connect for sharing something on my appliction. So I want
I am using AddThis add on for sharing my site on facebook, twitter and
I'm browsing source codes from two applications sharing one queue using MSMQ. The first
I'm making a video sharing site just for learning and fun. I am using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.