views:

236

answers:

1

I'm using SubVersion and TRAC on a C# project I am working on, and I have my TRAC system setup with a email address that can be used to create tickets. In my program I've added a simple "FeedBack" button in my program which sends an email to this address. To open the email I'm just "starting" a mailto link as shown below.

System.Reflection.Assembly assem = System.Reflection.Assembly.GetExecutingAssembly();
string ver = assem.GetName().Version.ToString();
System.Diagnostics.Process.Start("mailto:[email protected]?subject=<Provide a title for your feedback here>&body=< Describe the problem you are having or enhancement you would like to suggest here. Please be as descriptive as you can, and if possible list out the actions that will replicate the problem >%0D%0A%0D%0A%0D%0AVersion: "+ver);

The problem I'm running into is if the user is using Outlook and their copy of Outlook is setup to HTML the ticket that gets created ends up having a bunch of HTML code that I have to clean up. Is there some way to notify whatever mail client is handling it to send the email as text rather then HTML?

+3  A: 

There's nothing you can do (besides education) on the client - there's nothing in mailto to control a client side program. And, frankly, with the proliferation of web-based email - I think mailto is showing it's age.

Outlook should send a mime/multipart message, with both plain text and HTML parts. I'd guess you could extend or patch Trac to only grab the text/plain portion.

Otherwise, just create a form in your app to capture the email info. Again, if someone is using Hotmail or GMail - mailto is not likely to work anyway (or will open up their unconfigured Outlook Express, where they will dutifully type up an email and press Send. Only it won't go anywhere, because no SMTP servers are configured - so it will languish in the Outbox for years. Not that they will notice though...).

Mark Brackett
Yeah that's what I was afraid of. .oh well thanks for the answer though.
Eric Anastas