POP 3 mails

Can I use Winsock to read POP 3 mails ?
When I do this, Winsock1.State stays at 6 (connecting), and it is never 7 
(connected).
    Winsock1.Connect "mail.myservermail.com", 110
    Do While Winsock1.State <> 7

    Loop
    Winsock1.SendData "USER myuser@company.com"
    Winsock1.SendData "PASS mypwd"

If I go to a browser and enter "mail.myservermail.com", it goes to that 
website right away and I can enter the user name and password.
Why my winsock state stays at 6 (connecting) and never 7 (connected) ?
Is the port number for POP 3 emails always at 110 ?
Is winsock the correct way to read POP 3 emails ?

Thank you 


0
fniles
9/5/2010 8:09:32 PM
vb.general.discussion 1016 articles. 0 followers. Follow

5 Replies
1008 Views

Similar Articles

[PageSpeed] 31

On Sun, 5 Sep 2010 15:09:32 -0500, "fniles" <fniles@pfmail.com> wrote:
  
>Can I use Winsock to read POP 3 mails ?

Yes. 

>If I go to a browser and enter "mail.myservermail.com", it goes to that 
>website right away and I can enter the user name and password.

Yes but <smile> that's on port 80.   Your browser is connecting on
port 80 and "massaging" everything you see via the http protocol.  A
better means of testing would be to go to the command prompt and use
telnet with the mail server name and a port number.  

Pop servers sometimes might be pop.example.com or even
pop3.example.com.

>Why my winsock state stays at 6 (connecting) and never 7 (connected) ?
>Is the port number for POP 3 emails always at 110 ?
>Is winsock the correct way to read POP 3 emails ?

Yes, but this part I don't know.

Tony
-- 
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files 
  updated see http://www.autofeupdater.com/
0
Tony
9/6/2010 12:08:25 AM
Download Socket Wrench Freeware(including commercial use), and check 
"CheckMail" sample, which shows how to check for email.

http://www.catalyst.com/products/socketwrench/freeware/index.html


0
Nobody
9/6/2010 1:31:29 AM
  You can do it with the winsock control. You
can also use winsock without the control. The control
is just a wrapper around the API.

You can find various sample code here:

http://planetsourcecode.com/vb/scripts/BrowseCategoryOrSearchResults.asp?lngWId=1&txtCriteria=pop3

 There used to be a download called mailcheck.zip
from vbip.com for doing POP3 with no dependencies.
Vbip is gone now. I don't know if the download is still
out there.

 Another option might be this:
http://www.ericphelps.com/pop3/index.htm

Download the "power user version" for source code.
Sorry I'm not being more definitive. I know there's
lots of code out there, and I know you don't need to
add dependencies in order to do what you want, but
I've never had occasion to need POP3 code myself,
so I can't tell you which is best.

| Can I use Winsock to read POP 3 mails ?
| When I do this, Winsock1.State stays at 6 (connecting), and it is never 7
| (connected).
|    Winsock1.Connect "mail.myservermail.com", 110
|    Do While Winsock1.State <> 7
|
|    Loop
|    Winsock1.SendData "USER myuser@company.com"
|    Winsock1.SendData "PASS mypwd"
|
| If I go to a browser and enter "mail.myservermail.com", it goes to that
| website right away and I can enter the user name and password.
| Why my winsock state stays at 6 (connecting) and never 7 (connected) ?
| Is the port number for POP 3 emails always at 110 ?
| Is winsock the correct way to read POP 3 emails ?
|
| Thank you
|
| 


0
Mayayana
9/6/2010 1:54:40 AM
Thank you.

When I go to command prompt and telnet mail.myservermail.com 110, I got a 
window that says +OK <{some number}.{some numbers}@mail>

Without checking for Winsock1.state <> 7, if I call Winsock1.SendData "USER 
myuser@company.com" directly, I got the error "Runtime error 40006. Wrong 
protocol or connection state for the requested transaction or request".


"Tony Toews" <ttoews@telusplanet.net> wrote in message 
news:n2c8861fs7njuujvpfj8soidbm7p570p0d@4ax.com...
> On Sun, 5 Sep 2010 15:09:32 -0500, "fniles" <fniles@pfmail.com> wrote:
>
>>Can I use Winsock to read POP 3 mails ?
>
> Yes.
>
>>If I go to a browser and enter "mail.myservermail.com", it goes to that
>>website right away and I can enter the user name and password.
>
> Yes but <smile> that's on port 80.   Your browser is connecting on
> port 80 and "massaging" everything you see via the http protocol.  A
> better means of testing would be to go to the command prompt and use
> telnet with the mail server name and a port number.
>
> Pop servers sometimes might be pop.example.com or even
> pop3.example.com.
>
>>Why my winsock state stays at 6 (connecting) and never 7 (connected) ?
>>Is the port number for POP 3 emails always at 110 ?
>>Is winsock the correct way to read POP 3 emails ?
>
> Yes, but this part I don't know.
>
> Tony
> -- 
> Tony Toews, Microsoft Access MVP
> Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
> Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
> For a convenient utility to keep your users FEs and other files
>  updated see http://www.autofeupdater.com/ 


0
fniles
9/6/2010 2:27:44 AM
On Sun, 5 Sep 2010 21:27:44 -0500, "fniles" <fniles@pfmail.com> wrote:
  
>When I go to command prompt and telnet mail.myservermail.com 110, I got a 
>window that says +OK <{some number}.{some numbers}@mail>

Yup, that's about right.  If you were patient enough you could
actually read an email by typing in the right commands.

Tony
-- 
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files 
  updated see http://www.autofeupdater.com/
0
Tony
9/6/2010 3:58:10 AM
Reply:

Similar Artilces:

CRM 3.0 Implementation
I am interested in the experiences of others with implementing Microsoft CRM 3.0. I am a one man development team who has been tasked with implementing CRM 3.0 with 30 users initially. Our organization has been running on Lotus Notes for quite a while. We moved to echange for e-mail over a year ago but still use Lotus for custom databases. The first step will be pulling the data from Lotus Notes to CRM. I have looked into the Microsoft CRM 3.0 Certification. There is a company that offers a 10 day CRM 3.0 boot camp. Is this a good idea, and at what point should I take it? We would lik...

Can E-mail recipient policy be linked to the OU membership?
Running Exchange 2003 (mixed mode) and Windows 2003 server (Windows 2000 mixed mode): I'd like to create a e-mail recipient policy that is linked to the different OU's that are created on the system. Is it possible to link the policy to a specific OU or do I need to create groups on the AD to control which recipients a policy applies to? Martin Moustgaard Yes, you can create a recipient policy that looks to just a specific OU. It is done through LDAP queries. Here are some references to articles and whitepapers that discuss how to work with recipient policies. 249299.KB.EN-US HO...

Outlook Send/Receive mail SLOW
When I receive/send email, it loads sends/receives extremely slow. The percentage indicator when receiving/sending starts at 3-5% and stays that way for awhile. After several minutes, the mail eventually comes through. Any reason for this? ...

crm 3.0 error 03-01-06
Hello, I'me getting this error while installing crm3.0 for SBS: "error writing to file microsoft.mshtml.dll verify that you have access to that directory" That file is in the C:\Program Files\Microsoft.NET\Primary Interop Assemblies directory. I (and 'everyone') has full access to that dir. What can I do about this?? kind regards, Thomas ...

Setting up a new e-mail account
I'm trying to set up my yahoo account so that I receive my e-mail messages in my Outlook Inbox. I went to Accounts, and servers, and put in mail.yahoo.com for incoming mail (POP3) and smtp.yahoo.com for outgoing mail (smtp). When I click on the send/receive button I get an error message. Dave <anonymous@discussions.microsoft.com> wrote: > I'm trying to set up my yahoo account so that I receive > my e-mail messages in my Outlook Inbox. I went to > Accounts, and servers, and put in mail.yahoo.com for > incoming mail (POP3) and smtp.yahoo.com for outgoing mail &...

Office 2003 Service Pack 3--subsequent problems opening Publisher
I run Publisher 2003 on Windows XP. On June 13, I updated my system with Office 2003 Service Pack 3 so that I could open Word documents with the file ext docx. Subsequent to the Service Pack 3 installation, whenever I open a Publisher file (which I created), I get the following message: "Publisher has detected a problem in the file you are trying to open. If you are certain that this file came from a trusted source and does not contain harmful information, click OK." What is causing this and is there a way to stop this pop-up message? All publications? Error message when you...

Receiving POP3 mail into Outlook without Send/Receive
I want the POP3 mail to be received into Outlook (If open) when the mail arrives in POP3 account. Is that possible? Set an Automatic Polling Interval. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, delanda asked: | I want the POP3 mail to be received into Outlook (If open) when the | mail arrives in POP3 account. Is that possible? ...

Replying to an Outlook e-mail
When replying to e-mail in Outlook, everything works fine. But when I try to reply to an e-mail that has an embedded picture in it, Outlook won't send it. I get the message that the e-mail was sent, but it stays in the outbox and never sends. Any suggestions? -- Jack "Jack Johnson" <hotshotz@comcast.net> wrote in message news:D6C50AC7-EB37-4B54-9611-F9F42F1F1BA0@microsoft.com... > When replying to e-mail in Outlook, everything works fine. But when I try to > reply to an e-mail that has an embedded picture in it, Outlook won't send > it. &...

CRM 3.0 Login Problems
Some specific users are constantly getting prompted for CRM login in Outlook. We are using desktop client (online) online. This happens randomly. We have CRM 3.0 with rollup update 2 and IE7. We have also applied this fix http://support.microsoft.com/default.aspx/kb/934243/en-us. Also added the crm site to local intranet zone. Please help. Thanks. set the authentication in IE check rollup update 2 -- Regards, Imran MS CRM Certified Professional http://microsoftcrm3.blogspot.com Chat with me on MSN / Gmail / Skype : ID Is :.. mscrmexpert@gmail.com "raj" wrote: >...

Showing 3:54PM instead of 3:54:03PM
How do you get rid of the seconds in the time area. I have changed the formatting in the time. I use the excel file as a data source. I include the time in the mail merge. It always shows up with the seconds in the time. Very frustrating. HELP PLEASE!! TJ it may be formatted as text, so won't respond to changing the time format. if it is text, the TIMEVALUE formula will convert it to a decimal-based time value which can then be formatted by using Excel's normal Number formatting-- to get rid of the seconds. Eddie O "TJ" wrote: > How do you get rid of the secon...

Hyperlink problem #3
I've got two workbooks on a shared drive with hyperlinks linking the two. When a user clicks on the hyperlink on the first workbook, it takes him to the second workbook. Fine. However, when the user clicks on the hyperlink in the second workbook to go back to the first, the error message says that that workbook is already open and it cannot open two files with the same name. Help is appreciated! I just tried a small test in xl2002 and it worked ok for me. I use Insert|Hyperlink to create the links. Are you sure that the hyperlinks point at the file you want--same folder and e...

POP Password2
Hello Everyone. I am in the process of writing an Internet connection wizard program for the company I am working for. At present, I have all the pieces together beside the part of setting the email account password for outlook. If anyone have any ideas that could help. Please let me know Currently I have found the following info HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts\00000007 (.Is just the outlook account index. It increment each time a account is added) Value 4 Name: POP3 Password2 Type: REG_BINARY Data: 00000000 01 02 6d 00 61 00 69 00 - 6c 00 2e 00 7...

Outlook Client #3
Dear All, I have recently installed crm outlook client for one of my users and then also installed the 2 rollups for version 3.0 . Unfortunately outlook is still restarting even after the rollups. Kidnly advise the necessary solution that resolve the problem. Please clarify, outlook loads and then crash "restart"? Has Office applied with latest Office update? Frank Lee, Microsoft Dynamics CRM MVP http://microsoft-crm.spaces.live.com http://www.workopia.com/Links.htm "Faiz Amir" wrote: > Dear All, > I have recently installed crm outlook client for one of my ...

Rounding Numbers #3
I have a list of values as below: 476.14 361.99 345.69 463.08 515.29 403.44 330.68 347.64 375.36 I would like to create a formula that rounds the values to the nearest 0.05 eg. Round 476.14 to 476.15, 361.99 to 362.00, 375.36 to 375.35 etc… Is there anyway that I can do this? Thanks, Jane. JaneC wrote: > I have a list of values as below: > 476.14 > 361.99 > 345.69 > 463.08 > 515.29 > 403.44 > 330.68 > 347.64 > 375.36 > I would like to create a formula that rounds the values > to the nearest 0.05 eg. Round 476.14 to 476.15, > 361.99 to 362.00, 375.36...

I want to add a mail account without setting a SMTP server. Is it possible?
I want to add a second mail account that is outside my company. Since the company firewall does not allow us to connect to SMTP-servers I want to add this account without setting the SMTP propertiy. I cannot specify the company server as it is an Exchange server and the outside one an IMAP one. Currently I have specified the outside SMTP server since outook does not allow me to add an account wihtout setting this. I keep getting annoying error messages as my computer can't connect to the outside SMTP. Any one know a way around this? cheers, mortb The company server has SMTP enabled, u...

IE 7 / Win2k3 x64 server things pop-up blocker is on
I have a problem with one server where it thinks the pop-up block is on when it is actually not. I disable the pop-up blocker for all zones in group policy but I continue to receive messages from websites that pop-ups are disabled and that I need to enable them. I don't understand how this can be the case unless IE is doing something its not telling me about. Any ideas? PS IE ESC is disabled on this server. IE ESC was disabled before terminal services was installed. thanks Pete > ...I continue to receive messages from websites that pop-ups are > disabl...

SetWindowsHookEx #3
Hi there. Could someone explane to me what is the purpose of dwThreadId, the last member of SetWindowsHookEx function? I've expected that this is a thread id with which hooks is associated. That means that hook is getting only messages produced by this particular thread. But it looks like I'm getting system wide messages anyway. so could somone make it clear for me? In fact I need to process a mesages of only one window. I know the thread id of that window. But! this thread is not in my process! And I don't want a real system wide hook because it slows down the box. Ok, I think ...

RMS 1.2 vs 1.3, plus integrate with Great Plains
1.) I am working on an assessment for upgrading our current RMS software from 1.2 to 1.3. My assessment will take in account the benefits, broken down by store operations (Retail) and the benefits to IT. Also, list risks and potential problems that might be experienced. We currently have 28 stores with 3+ registers per location with another 22 new stores on the schedule over the next 2 years. Are their other in this group of similiar size that have done this upgrade to the new version? 2.) If we do not upgrade the software, can we still integrate the RMS to Great Plains? Would we...

Saving e-mail & attachments when upgrading
I'm upgrading from NT4 to XP Home and the only data I need to keep are the emails & attachments. I have to format the hard drive to eliminate the partitions. This machine is on a network and I can save to the other machune. Look here for all the information you need on backup and restoration of Outlook data: http://www.slipstick.com/config/backup.htm -- Jocelyn Fiorello MVP - Outlook *** Replies sent to my e-mail address will probably not be answered -- please reply only to the newsgroup to preserve the message thread. *** "Mike" <mike@hosemart.com.au> wrote ...

how to install Microsoft Mail to Outlook 2003
pls help I found 'this' (http://www.outlook-tips.net/howto/msmail.htm) on www.outlook-tips.net I don't know if it works... ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ It does. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Search for answers: http://groups.google.com Most recent posts to the Outlook newsgroups: ...

Duplicate E-Mail #4
Every time I get e-mail from certain users I get their e-mail twice. I have not been able to figure out why this is happening. Is it their fault or my fault and if it is my fault, how do I fix it? Thanks, Al Alfred Kaufmann <al_kaufmann@hotmail.com> wrote: > Every time I get e-mail from certain users I get their e-mail twice. I > have not been able to figure out why this is happening. Is it their > fault or my fault and if it is my fault, how do I fix it? See if this helps: http://www.howto-outlook.com/faq/duplicates.htm -- Brian Tillman [MVP-Outlook] ...

Exchange 2003, Two Sites, Two Smarthosts, One Domain, No Internal mail!!
Hi, I hope there is someone out there who can point me in the right direction. We have two sites, Brisbane and Sydney, connected by a frame realy connection. Sydney is currently running exchange 2003 (upgraded by migration from exchange 5.5 about a month ago). Brisbane is currently running their mail through sendmail and sendmail only. We have just installed exchange 2003 on server 2003 box in Brisbane and are trying to get the two sites working in two routing groups. The topology will be the same in both Brisbane and Sydney, in that each city will have an external mail server running sendma...

Odd e-mail duplication problem
All e-mails promoted or Tracked in CRM Outlook client are being copied to one particular Account that is unrelated. The e-mails are copied correctly to the history of the desired accounts and Contacts but also copy to one particular Accountl as well. As anyone seen anything like this and have any ideas what could be wrong? -- Darryl - dh@mtccrm.com -www.mtccrm.com - Only Microsoft CRM ...

Windows mail asking to verify username and password
I was in Windows Mail when suddenly a box popped up asking for my username and password from Windows Mail.. Although I attempted correctly several times it still will not work. I contacted my kerrlake server and we tried several things including deleting the account and resetting it back up but it still will not open. I can receive my emails on my blackberry and can get on the internet. Also, a protocal error message pops up. Please help! -- Diamond & Associates When you get that repeated prompt for username and password, click = Cancel, which should then produce an erro...

Start macro creating a mail with contact data and autotext
Hallo, I am working with an user form. The developing of that form started with Outlook XP with a lot of code inside for different buttons. I changed to Outlook 2007 and unfortunately the code of the form was not longer displayed. What I learned about this is that MS does not support to much code in the form (or maybe a bug). They also do not support any longer. I was sending this form to MS support but they told it is do much code inside and they do not know, why the code is not displayed. In Outlook 2003 the code is displayed as in Outlook XP. Because I do not know real...