creating attachments for a new MailMessage()

Hello, I am trying to create a static method in my class file to handle email sending. But I do not know how to deal with attachments. The method must be generally written (I mean I do not know what type of attachments I will have, or how many.

So this is what I have written:

public static void SendMail(string sender, string to, string subject, string body, string attachment)
{
using (mailstuff.MailMessage message = new mailstuff.MailMessage())
{

message.IsBodyHtml = true;
message.From = new MailAddress(sender);
message.To.Add(to);
message.Subject = subject;
message.Body = body;

Attachment data = new Attachment(attachment, MediaTypeNames.Application.Octet );
message.Attachments.Add(data);
SmtpClient sClient = new SmtpClient();
//host and credentials can be found in webconfig so no need

sClient.Send(message);

}

}

but it does not compile. It says:

Error 1 The name 'MediaTypeNames' does not exist in the current context

I was following the msdn example here:
http://msdn2.microsoft.com/en-us/library/system.net.mail.attachment.aspx

What am I doing wrong?
I already included System.Net.Mail in using. (mailstuff is: using mailstuff = System.Net.Mail)
Also the method works fine if I comment the part regarding attachments.

Thank you in advance.
[1753 byte] By [novice_andrei] at [2007-11-20 10:54:13]
# 1 Re: creating attachments for a new MailMessage()
found, had to include also: System.Net.Mime.

sorry for this, thank you anyway.
novice_andrei at 2007-11-9 11:53:54 >