Link to home
Start Free TrialLog in
Avatar of printmedia
printmedia

asked on

Do not download or import email signature company logos vb.net

Hi all.

I have a Windows form in vb.net that allows the end user to drag an Outlook email and drop it into a datagridview control, it save the recipients, subject line, email body into a SQL Server table and if the email has any attachments it imports the attachments into a shared network folder. We've been testing it for a couple of days now and it's working great but we're running into an issue where it'll download/import the attachments in the email but if the email has a company logo in the email signature it also brings it in. Is there a way to skip these type of email signature files? So far, they've been jpeg and png files sometimes 2KB, 11KB, 64KB not big files but don't want them to be imported.

I was thinking maybe not importing jpeg, png files less than 100K or something, but maybe there is an image file that we need to download/import that would otherwise be skipped.

Any advise is greatly appreciated. Thank you in advance.
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

You could always cycle through the Attachments on the Email and filter out whatever you'd like, but what's the reason? You're not going to really bloat that table with couple of image files?
Avatar of printmedia
printmedia

ASKER

Thank you for your reply. The point is not to bring those company logo image files over but I don't know the image file is a company logo until I click the file and see it. The emails we receive from our clients don't label their email signature logos in a special way it's usually just image001.jpeg
Hi Printmedia,

I do not think it is possible in the ways you would really like to implement. If you really want it to be an automated solution, based on the image sender's email, you can maintain such logo files separately and match against existing images(using image's hash generation OR less accurate file's contents hash generation) and if a match is found do not store that file. You could also go for Image recognition libraries or cloud based APIs - if you want to increase the accuracy.

No matter what method you use, there is a chance of error. If you really can't loose any important image then I suggest you allow these other images to be stored.

Regards,
Chinmay.
ASKER CERTIFIED SOLUTION
Avatar of printmedia
printmedia

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial