Standard-Email Programm öffnen c# & mailto:

by robert 4. June 2009 13:21

Folgender Code öffnet den “Default-Email-Client”:

System.Diagnostics.Process.Start(
    String.Format("mailto:{0}?subject={1}&body={2}",
        "demo@mail.de",
        "Nachricht von test@test.de", 
        "Hallo %0aNachricht %0aGrußformel"));
 
“%0a” erzeugt einen Zeilenumbruch.
 
6-4-2009 1-01-54 PM 

Attachments werden nicht konsistent interpretiert und sind Email-Client Versions und Patch abhängig. “Attach” wird von Outlook 2007 aus Sicherheitsgründen nicht weiter unterstützt. Werden Attachments verbindlich benötigt ist man mit dem direkten Versand der Email auf der sicheren Seite.

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About Oliver

shades-of-orange.com code blog logo I build web applications using ASP.NET and have a passion for javascript. Enjoy MVC 4 and Orchard CMS, and I do TDD whenever I can. I like clean code. Love to spend time with my wife and our children. My profile on Stack Exchange, a network of free, community-driven Q&A sites

About Anton

shades-of-orange.com code blog logo I'm a software developer at teamaton. I code in C# and work with MVC, Orchard, SpecFlow, Coypu and NHibernate. I enjoy beach volleyball, board games and Coke.