Closed jvdvleuten closed 11 years ago
Sorry, I thought I replied the other day. ;]
Have you heard of the System.Net.Mime
namespace? In order to keep parity with System.Net.Mail
as much as possible, I would like to apply the classes in MimeType as much as possible. This includes a ContentDisposition
class (and it's boolean Inline
property), and a ContentType
class. What do you think of doing something like that instead? So instead of .Where(att =>att.AttachmentType == AttachmentTypes.Attachment)
, you would write .Where(att=>!att.ContentDisposition.Inline)
.
Here's an initial shot at it: bfc4861e739af6aaf8dee5fdf1fe32f00b9fafde
Nice :) will have look at it later this weekend! Thanks for your input, looks much better to use the Mime namespace. Never heard of it before.
Looks good to me, if no content-disposition specified or it's rubbish, why have you chosen it to be inline?
I will update the test's name if so.
Continued here https://github.com/andyedinborough/aenetmail/pull/129
I wanted to filter out inline attachments in my application. There was no proper way of doing this yet and I have built it in. Could not find any more content-disposition types besides 'attachment' and 'inline'. If it is not find, it default to 'Unknown'.
Added AttachmentType to Attachment.cs to differentiate between Attachments and Inline-Attachments Added UnitTests