Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I wanted to ask ...I want to make a program in visual basic (2015) that it will receive an email (outlook,hotmail,gmail) with an attachment (picture) and open it in a picturebox.

Is this possible? If yes can anyone help me with the code?

Appreciate

What I have tried:

I try several codes that i found online but non of them seems to work
Posted
Updated 11-May-17 21:52pm

Sure, it's possible. Is it practical? No.

You'd be writing code for each mail client you wanted to support. Or, bypassing those entirely, you'd be writing your own email client. Whichever route you take, it's NOT a trivial thing to do.

Of course the code you found doesn't work. Chances are good you don't understand it and it doesn't really do what you're describing in the first place.

You're not going to find any code for what you want to do. It's just not that useful nor practical.
 
Share this answer
 
Comments
Nicolaoscon 11-May-17 20:40pm    
Yeah that i am trying to do is to send image program using email and then "download" the picture in the app and in the picturebox and then try to match the picture (let say is a face) from my database...I just want help with the code...
Dave Kreskowiak 11-May-17 20:54pm    
Most email system will not send executables in an email. Also, you have limitations on the size of attachments you can send, usually 10MB ENCODED with Base64. That means your usable size is somewhere around 6 to 7MB.

You're not receiving an email in your program. Your program has to scan the email inbox of the mail systems. That's going to be different code for each email system you're going to support.

Nobody is going to write your code for you.

Nicolaoscon 11-May-17 21:08pm    
To begin with, i did not ask for anyone to write me the code :) Second only one email system i just put 3 because i use and the three of them and the only thing i want to receive in the app is a picture
Dave Kreskowiak 11-May-17 22:12pm    
Your picture is inside a container, an attachment, which is inside an email, which is in another container, an inbox somewhere. You cannot "just get the picture". You cannot go straight to the picture. You must navigate to the picture going through all the containers that surround it.

How you do that depends entirely on the email system you're supporting.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900