[Mono-bugs] [Bug 570930] System.Net.Mail.Attachment ArgumentNullException

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jul 12 15:13:50 EDT 2011


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

https://bugzilla.novell.com/show_bug.cgi?id=570930#c2


Jim Harte <jim_harte at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jim_harte at hotmail.com

--- Comment #2 from Jim Harte <jim_harte at hotmail.com> 2011-07-12 19:13:49 UTC ---
I ran into this same bug on 2.6.4.  I found that it occurs if you do not set
the Body property of the MailMessage object.  To workaround in the sample
above, simply add mm.Body = String.Empty in the AttachFile function.

In MS .NET, the Body property of a MailMessage appears to be initialized to an
empty string upon creation of the object.  That should be the fix for Mono...

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