[Mono-bugs] [Bug 366947] New: System.Net.Mail. MailMessage attachment filename ir wrong on Linux

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Mar 4 09:55:33 EST 2008


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


           Summary: System.Net.Mail.MailMessage attachment filename ir wrong
                    on Linux
           Product: Mono: Class Libraries
           Version: 1.2.6
          Platform: x86
        OS/Version: SLES 10
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: artis.krigens at topveikali.lv
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Description of Problem:

When sending mail from application (using version 2.0 assemblies) attachment
filename shows absolute path of file not just filename.
This happens on SLES10 with mono 1.2.6.
On windows xp with mono 1.2.6 works fine.


Steps to reproduce the problem:
1. Create C# 2.0 application with code

using System;
using System.Net.Mail;

namespace MailTest
{ 
class Program
{ 
public static void Main(string[] args)
{ 

SmtpClient mailClient = new SmtpClient();
mailClient.Host = "myserver";
mailClient.DeliveryMethod = SmtpDeliveryMethod.Network;

MailMessage mailMsg = new MailMessage();
mailMsg.From = new MailAddress("email at email.com");
mailMsg.Subject = "test";
mailMsg.To.Add( new MailAddress("email at email.com"));
mailMsg.Body = "test";
mailMsg.Attachments.Add(new Attachment("/test/myfile.log"));
mailClient.Send(mailMsg); 

}
}
}

2. Compile with gmcs and run application


Actual Results:
Recieved mail contains full path of file not just filename
Attachment part of message source:
..
----boundary_0_b334a381-00df-4516-b70b-4169ee590c88
content-type: text/plain; name=/test/myfile.log
content-transfer-encoding: base64
content-disposition: attachment; filename=/test/myfile.log
..


Expected Results:
Should be just filename
like:
..
----boundary_0_b334a381-00df-4516-b70b-4169ee590c88
content-type: text/plain; name=myfile.log
content-transfer-encoding: base64
content-disposition: attachment; filename=myfile.log
..


How often does this happen? 
Always

Additional Information:


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