title: How can i prevent the attachment content from displaying in the body of the message?
body: <p>I'm working on an asp.net c# application that sends an email with one attachment.
  The attachment is a vCalendar file.
  Here's the code:</p>
  
  <pre><code>            StringBuilder sbCalendar = new StringBuilder();
              DateTime dtStart = eventDate;
              DateTime dtEnd = eventDate;
  
              sbCalendar.AppendLine("METHOD: REQUEST");
              sbCalendar.AppendLine("BEGIN:VCALENDAR");
              sbCalendar.AppendLine("PRODID:-//DP//NET");
              sbCalendar.AppendLine("MIMEDIR//ENVERSION:1.0");
              sbCalendar.AppendLine("METHOD:REQUEST");
              sbCalendar.AppendLine("BEGIN:VEVENT");
              sbCalendar.AppendLine("DTSTAMP:" + dtStart.ToUniversalTime().ToString("yyyyMMdd\\THHmmss\\Z"));
              sbCalendar.AppendLine("DTSTART:" + dtStart.ToUniversalTime().ToString("yyyyMMdd\\THHmmss\\Z"));
              sbCalendar.AppendLine("DTEND:" + dtEnd.ToUniversalTime().ToString("yyyyMMdd\\THHmmss\\Z"));
              sbCalendar.AppendLine("LOCATION:" + eventLocation);
              sbCalendar.AppendLine("DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" + eventBody);
              sbCalendar.AppendLine("SUMMARY:" + eventSubject);
              sbCalendar.AppendLine("PRIORITY:3");
              sbCalendar.AppendLine("UID:" + Guid.NewGuid().ToString());
              sbCalendar.AppendLine("ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION:MAILTO:required@participant.foo");
              sbCalendar.AppendLine("ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:MAILTO:chair@foo.foo");
              sbCalendar.AppendLine("CLASS:PUBLIC");
              sbCalendar.AppendLine("ORGANIZER:MAILTO:organizer@foo.foo");
              sbCalendar.AppendLine("SEQUENCE:0");
              sbCalendar.AppendLine("STATUS:TENTATIVE");
              sbCalendar.AppendLine("END:VEVENT");
              sbCalendar.AppendLine("END:VCALENDAR");
  
              byte[] byteArray = Encoding.UTF8.GetBytes(sbCalendar.ToString());
  
              Stream contentStream = new MemoryStream(byteArray);
  
              SmtpClient smtp = new SmtpClient("localhost");
  
              MailMessage memo = new MailMessage();
  
              memo.IsBodyHtml = true;
  
              memo.From = new MailAddress("from@ddress.foo");
  
              foreach (string emailAddress in emailAddresses)
              {
                  memo.To.Add(emailAddress);
              }
  
              memo.Body = messageBody;
              memo.Subject = messageSubject;
  
              Attachment attachment = new Attachment(contentStream, "termenLitigiu.ics", "text/calendar");
              attachment.TransferEncoding = System.Net.Mime.TransferEncoding.Base64;
              memo.Attachments.Add(attachment);
              smtp.Send(memo);
  </code></pre>
  
  <p>This works and does what is supposed to do, it sends a working (recognized by outlook) vcalendar file.</p>
  
  <p>The problem is that in the body of the mail, besides the contents of the messageBody parameter, the contents of the attached file also appear, something like this:</p>
  
  <p>From: sender
  Sent: Tuesday, October 05, 2010 4:59 PM
  To: someemail</p>
  
  <blockquote>
    <p>messageBody contents here</p>
    
    <p>METHOD: REQUEST
    BEGIN:VCALENDAR
    PRODID:-//DP//NET
    MIMEDIR//ENVERSION:1.0
    METHOD:REQUEST
    BEGIN:VEVENT
    DTSTAMP:20101006T135934Z
    DTSTART:20101006T135934Z
    DTEND:20101006T135934Z
    LOCATION:Minstead
    DESCRIPTION;ENCODING=QUOTED-PRINTABLE:My first meeting
    SUMMARY:Learning Calendaring and Scheduling
    PRIORITY:3
    UID:721d9e3c-9010-47f5-9ad0-83c38cb0cbb7
    ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION:MAILTO:someemail
    ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:MAILTO:someemail
    CLASS:PUBLIC
    ORGANIZER:MAILTO:someemail
    SEQUENCE:0
    STATUS:TENTATIVE
    END:VEVENT
    END:VCALENDAR</p>
  </blockquote>
  
  <p>I want to get rid of that text, and display only the contents of my messageBody parameter and have the vCalendar file just attached to the mail message.
  How can i do this? Is this an outlook issue or a coding issue?</p>
  
  <p>Edit: I'm only interested in displaying the message in Microsoft Outlook. I've looked into the source of the message (in Outlook right click > View Source) and the text i want to get rid of is within the <code>&lt;body</code>><code>&lt;/body</code>> html tags of the message)</p>