[Mono-bugs] [Bug 347553] New: Sys.Net.Mail: Encoding problems when using Attachments

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Dec 11 07:42:25 EST 2007


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: mono-bugs at ximian.com
        ReportedBy: juraj at hotfeet.ch
         QAContact: mono-bugs at ximian.com
          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 js at hotfeet.ch js at hotfeet.ch"


Resulting Mail:
===============
Date: Tue, 11 Dec 2007 13:34:09 +01:00
From: js at hotfeet.ch
To: js at hotfeet.ch
Subject: Test
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary=--boundary_0_498eb24b-ce0b-4162-a39d-56d937200896
Message-Id: <20071211123409.C6B094F0A5D at mercury.hotfeet.ch>
X-Evolution-Source: imap://js%40hotfeet.ch@mail.hotfeet.ch/


----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.


More information about the mono-bugs mailing list