BugNET

Open source issue tracking & project management
Welcome to BugNET Register | Login |

BugNET Forums

 
  Forum  Development  General develop...  Small patch: embedded attachments
Previous Previous
 
Next Next
New Post 7/17/2008 9:09 AM
User is offline patman
3 posts
No Ranking


Small patch: embedded attachments 

Hello,

i have created a small patch so that embedded images also get uploaded when received through POP3. Note that we are still 'stuck' at version 0.7.889, but i have patched against the SVN trunk. Hope it can be of help to someone else :)

Also, i hope that the formatting survives in this message. I thought it's too small to make a ticket in the tracker and such...

Index: MailboxReader.cs
===================================================================
--- MailboxReader.cs    (revision 601)
+++ MailboxReader.cs    (working copy)
@@ -293,12 +293,14 @@
                                         {
                                             entry.Content.Append(message.HtmlDataString);
                                         }
-                                    }                                   
+                                    }
 
-                                    Hashtable embeddedFiles = new Hashtable();
-                                    ArrayList attachedFiles = new ArrayList();
+                                    ArrayList attachedFiles = new ArrayList();
+                                    MimeDataList attachments = new MimeDataList();
+                                    attachments.AddRange(message.Attachments);
+                                    attachments.AddRange(message.Visuals);
 
-                                    foreach( MailAttachment attachment in message.Attachments )
+                                    foreach (MailAttachment attachment in attachments)
                                     {
                                         if ( attachment.Data != null && attachment.FileName != null && attachment.FileName.Length > 0)
                                         {

 
Previous Previous
 
Next Next
  Forum  Development  General develop...  Small patch: embedded attachments

Forum Policy

These Discussion Forums are dedicated to the discussion of the BugNET issue tracker.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:
1. No Advertising.
2. No Flaming or Trolling.
3. No Profanity, Racism, or Prejudice.
4. Site Moderators have the final word on approving/removing a thread or post or comment.
5. English language posting only, please.