https://bugzilla.novell.com/show_bug.cgi?id=347553


           Summary: Sys.Net.Mail: Encoding problems when using Attachments
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [EMAIL PROTECTED]
          Found By: ---


Test case:
==========
using System.Net.Mail;

class Test {
        static void Main(string[] args) {
                MailMessage msg = new MailMessage(args[1], args[2]);
                msg.Subject = "Test";
                msg.Body = "Test";
               
msg.Attachments.Add(Attachment.CreateAttachmentFromString("Test", "Test"));

                SmtpClient client = new SmtpClient(args[0]);
                client.Send(msg);
        }
}

Usage
======
mono mailtest.exe [mail server] [from] [to]
e.g. "mono mailtest.exe localhost [EMAIL PROTECTED] [EMAIL PROTECTED]"


Resulting Mail:
===============
Date: Tue, 11 Dec 2007 13:34:09 +01:00
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Test
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary=--boundary_0_498eb24b-ce0b-4162-a39d-56d937200896
Message-Id: <[EMAIL PROTECTED]>
X-Evolution-Source: imap://[EMAIL PROTECTED]/


----boundary_0_498eb24b-ce0b-4162-a39d-56d937200896
content-type: text/plain
content-transfer-encoding: 7bit

€€€€

----boundary_0_498eb24b-ce0b-4162-a39d-56d937200896
content-type: text/plain; name=Test
content-transfer-encoding: quoted-printable
content-disposition: attachment; filename=Test

Test

----boundary_0_498eb24b-ce0b-4162-a39d-56d937200896--


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to