NEWS   PRODUCTS   DOWNLOADS   SUPPORT   CONTACT   DEVELOPERS    COMMUNITY

ANPOP POP3 COMPONENT BUILD 5.6

Platform: Windows95/98/2000/NT/ME/XP/2003

Buy   Download   Detail

ANPOP V5.6 Release
January, 2005

ANPOP is one of the high performance and comprehensive COM Object in the market. With ANPOP, your ASP, VB, Visual C++, C#, .NET framework or other COM environment applications can retrieve email from mail server based on POP3 protocol and parse email based on MIME.

ANPOP Object supports all operations of POP3 protocol. It incorporates POPMSG object that parses email structure, abstracting specified stuffs from Message Body, such as Recipients, Subject, Body, Attachment and more. Developer can easily use it to develop email client tool and web application.

Quick Tutorial - ASP/VB/VC++

With only some simple scripts your applications will be enabled to retreive email from POP3 server and parse email based on MIME.

Using this component to retrieve email in ASP

Set POP3 =Server.CreateObject("ANPOP.POPMAIN") 'create pop3 main object
Set POP3_MSG = Server.CreateObject("ANPOP.POPMSG") 'create pop3 msg object
Dim lRet As Long
Dim lCount As Long
lRet = POP3.Connect( "pop3.email.com", "John", "John123" ) 'connecting pop3 server
If lRet = 0 Then
    lCount = POP3.GetTotalOfMails()
    For i = 1 To lCount
       POP3_MSG.RawContent = POP3.Retrieve( i )
       'Saving email to disk
       POP3_MSG.ExportFile "c:\pop3" & i & ".eml"
       'Deleting email from pop3 server
       POP3.Delete i
    Next
End If
'Cancel deletion operations
'POP3.Reset
POP3.Close

Using this component to retrieve email in Visual Basic

Set POP3 =Server.CreateObject("ANPOP.POPMAIN") 'create pop3 main object
Set POP3_MSG = Server.CreateObject("ANPOP.POPMSG") 'create pop3 msg object
Dim lRet As Long
Dim lCount As Long
lRet = POP3.Connect( "pop3.email.com", "John", "John123" ) 'connecting pop3 server
If lRet = 0 Then
    lCount = POP3.GetTotalOfMails()
    For i = 1 To lCount
       POP3_MSG.RawContent = POP3.Retrieve( i )
       'Saving email to disk
       POP3_MSG.ExportFile "c:\pop3" & i & ".eml"
       'Deleting email from pop3 server
       POP3.Delete i
    Next
End If
'Cancel deletion operations
'POP3.Reset
POP3.Close

Using this component to parse email in Visual Basic

Dim POP3_MSG As Object
Set POP3_MSG = CreateObject("ANPOP.POPMSG") 'create com object
Dim lCount As Long
POP3_MSG.ImportFile "c:\pop3_test.eml" 'import email to this component

MsgBox "BodyText: " & POP3_MSG.GetBodyText() 'get email body text
MsgBox "Date: " & POP3_MSG.GetDate() 'get email's date
MsgBox "From: " & POP3_MSG.GetFromAddress() 'get sender's email address
MsgBox "ReplyTo: " & POP3_MSG.GetReplyTo() 'get email address to reply
MsgBox "Subject: " & POP3_MSG.GetSubject() 'get email's subject
MsgBox "Size: " & POP3_MSG.GetMessageSize() 'get email's size

'get all normal recipients' email address
lCount = POP3_MSG.GetRecipientCount()
For i = 1 To lCount
  MsgBox "To: " & POP3_MSG.GetRecipientAddr(i)
Next

'get all CC recipients' email address
lCount = POP3_MSG.GetCCCount()
For i = 1 To lCount
   MsgBox "CC: " & POP3_MSG.GetCCAddr(i)
Next

'save all attachments of this email to c:\
lCount = POP3_MSG.GetAttachmentCount()
For i = 1 To lCount
   POP3_MSG.SaveAttachment "c:\", i
Next

Using this component to retrieve email in Visual c++

#include "ANPOP.h"
#include "ANPOP_i.c"
#include <comdef.h>
//Create pop3 connection object and messge object

IPOPMAIN* pConnection = NULL;
IPOPMSG* pMessage = NULL;
HRESULT hr = ::CoInitialize( NULL );

hr = ::CoCreateInstance( CLSID_POPMAIN,
   NULL,
   CLSCTX_ALL,
   IID_IPOPMAIN,
   (LPVOID*)&pConnection );

_ASSERT( SUCCEEDED( hr ) && pConnection != NULL );

hr = ::CoCreateInstance( CLSID_POPMSG,
   NULL,
   CLSCTX_ALL,
   IID_IPOPMSG,
   (LPVOID*)&pMessage );

_ASSERT( SUCCEEDED( hr ) && pMessage != NULL );

//Connect to pop3 email server
long lRet = 1;
pConnection->Connect( _bstr_t("pop3.control.com"), _bstr_t("Jack"), _bstr_t("ja1234"), &lRet );

if( lRet == 0 )
{
//Get total count of emails existing on POP3 server.
   pConnection->GetTotalOfMails( &lRet );
   long lLen = lRet;
   for( int i = 0 ; i < lLen; i++ )
   {
//Retrieve each email and save it to disk
     BSTR bstrOut = NULL;
     pConnection->Retrieve( i+1, &bstrOut );
     pMessage->put_RawContent( bstrOut );
    
     TCHAR szBuf[256];
     ::wsprintf( szBuf, "%s\\%d.eml", (LPCSTR)m_strPath, i+1 );
     CString strFile = szBuf;
     pMessage->ExportFile( strFile.AllocSysString(), &lRet );
    
     ::SysFreeString( bstrOut );
     bstrOut = NULL;
   }
}
pConnection->Close();

pConnection->Release();
pConnection = NULL;

pMessage->Release();
pMessage = NULL;

::CoUninitialize();

Learn more information about ANPOP COMOPONENT

ANPOP documentation/samples

Email: support@adminsystem.net

pop3 control, ocx, activex, email component for ASP , VB, VC++ mail, send email,smtp,smtp, download activex,pop3 control,pop3 component,pop3 ocx, pop3 vbx,pop3 ole,pop3 dll,pop3 library, pop3 vbx, pop3 and vb, asp, vc++, pop3 component for Visual Basic,Delphi,VC++,VJ++,powerbuilder,c++builder,mailbuilder,mail builder

2001-2005 © Copyright AdminSystem Software Limited. All rights reserved.
1 2 10 3 4 5 6 7 11 8 1