|
-
Apr 5th, 2010, 07:26 PM
#1
Thread Starter
Junior Member
Getting Email from GMail
I want to make an App that will get my unread emails from gmail, then send them out to my cell phone.
I am not too sure on how to do the networking parts of this program, any suggestions to start?
I know I would have to connect to the IP of gmail, but I don't know how to handle the login part.
-
Apr 6th, 2010, 04:11 AM
#2
Lively Member
Re: Getting Email from GMail
Gmail does this anyway...
however.. If your serious there are several precompiled DLL's you can call in your code to connect to and handle POP3 mail downloads. I'm not sure how you would "send the data" to your "cell-Phone" but there are several companies that allow you to "feed" them data into the SMS API and it will send to your phone however this will cost..
This may help?
http://www.a1vbcode.com/snippet-3383.asp
-
Apr 6th, 2010, 04:45 AM
#3
Re: Getting Email from GMail
I had to do the same thing a while ago. There's loads of POP3 clients available that allow you to read email, but almost none use SSL (some kind of secure connection), and gmail requires SSL.
This one does use SSL:
http://csharpmail.codeplex.com/releases/view/41762
It worked, but I haven't played with it alot and there were some strange things in regards to how many emails were returned. Sometimes it was 350 emails, sometimes only 10. It seems it only returns 'unread' emails, but I'm not sure what determines whether an email is 'unread' (because I read those 10 emails in the webbrowser gmail client already)...
If you downloaded the DLL you can just reference it in your project. If you downloaded the source then you need to add that project to your solution, and reference the project instead.
You'd then use kind like this to get the emails
vb.net Code:
Using client As New Pop3Client() client.Password = "your password" client.ServerName = "pop.gmail.com" client.Port = 995 client.Ssl = True client.Authenticate() For i As Integer = 1 To client.GetTotalMessageCount() Dim msg As Pop3Message = client.GetMessage(i) MessageBox.Show(msg.From) MessageBox.Show(msg.BodyText) MessageBox.Show(msg.Date.ToString) Next End Using
That's how I used it anyway, but as I said I never played with it much, so there might be something wrong with that.
As for sending them to your phone, do you mean send them as emails? .NET has a built in email client (which can only send, not read) so perhaps you could use that.
-
Apr 7th, 2010, 07:11 PM
#4
Thread Starter
Junior Member
Re: Getting Email from GMail
Okay I see where you're going with POP3 code. and I was thinking of sending the emails to my phone either by fowarding the messages to my phones email on the ATT networks, or through AIM chat client.
-
Apr 7th, 2010, 07:59 PM
#5
Re: Getting Email from GMail
The actual problem is attachments in a mail.
I was making my own program but i had to stop it and move to ASP pronto, but the most probable problem would be attachments if you decide to have them.
Am amazed Microsoft neglects that.
Also if you have office installed then have a look http://msdn.microsoft.com/en-us/libr...8VS.80%29.aspx
I've used the first version on the old CF for mobile and of course was a total BS but maybe they have fixed it since then
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Apr 7th, 2010, 10:23 PM
#6
Thread Starter
Junior Member
Re: Getting Email from GMail
Well the reason I am trying to develop this app is to not have to pay for internet on my mobile (just yet)....But I am going to start planning it out tomorrow most likely. I'll probably need help so I'll be sure to post.
-
Apr 7th, 2010, 11:14 PM
#7
Re: Getting Email from GMail
If you don't want to pay , you can also find a free Wifi hotspot.
That's what i currently do.....You will need net somewhere in time as you say, so your app would probably be as a "know how" project i guess..
Ah and is 100% LEGIT ( )
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|