http://bugzilla.novell.com/show_bug.cgi?id=621639
http://bugzilla.novell.com/show_bug.cgi?id=621639#c0 Summary: Sys.Net.Mail Unable to embed image and attach files in the same mail. Classification: Mono Product: Mono: Class Libraries Version: 2.6.x Platform: All OS/Version: All Status: NEW Severity: Normal Priority: P5 - None Component: System AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: Development Blocker: Yes Description of Problem: When we embed an image in a html mail, and then attach a file to this mail the mail sent doesn't render as specified. It works fine on MS .Net Steps to reproduce the problem: MailMessage mail = new MailMessage(); mail.From = new MailAddress("[email protected]"); mail.To.Add("[email protected]"); mail.Subject = "This is an email"; AlternateView plainView = AlternateView.CreateAlternateViewFromString("This is my plain text content, viewable by those clients that don't support html", null, "text/plain"); AlternateView htmlView = AlternateView.CreateAlternateViewFromString("Here is an embedded image.<img src=cid:companylogo>", null, "text/html"); LinkedResource logo = new LinkedResource( "c:\\temp\\logo.gif" ); logo.ContentId = "companylogo"; htmlView.LinkedResources.Add(logo); mail.AlternateViews.Add(plainView); mail.AlternateViews.Add(htmlView); //When we comment this line it works fine. mail.Attachments.Add(new Attachment(attachedFile)); SmtpClient smtp = new SmtpClient("127.0.0.1"); smtp.Send(mail); How often does this happen? Always -- Configure bugmail: http://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
