ANPOP Developers Center > Frequently Asked
Questions
Retrieve Email
What is POP3 protocol?
POP3 is an abbreviation of POST OFFICE PROTOCOL. Its function is to
retrieve email from server.
How can I retrieve
email via proxy server?
It requires that your proxy server supports pop3 proxy. Take proxy address
as POP3 server address, then use connect method like this:
Connect( proxy, pop3 account + "#" + POP3 server, password).
usage example:
oPop3.Connect( "192.168.0.1", "test@adminsystem.net#mail.adminsystem.net", "test" )
Remarks:
Some proxy servers run as gateways. In this case your application can connect to
POP3 server directly. To learn more, you could consult
the administrator of your proxy server.
How can I preview
email without downloading the whole email file?
You can use GetMsgHeader method instead of Retrieve method of POPMAIN object.
usage example:
nCount = oPop3.GetTotalOfMails()
For i = 1 To nCount
emailHeader = oPop3.GetMsgHeader(i)
oMsg.RawContent = emailHeader
'oMsg.GetSubject(), oMsg.GetFrom() and etc
Next
How to retrieve email
in asynchronous mode in ASP/ASP.NET
As ASP/ASP.NET don't support component events handle, you can't use
asynchronous mode of POPMAIN object for this purpose. Alternatively,
you can use Pop3Request/Pop3Queue to retrieve email asynchronously in ASP/ASP.NET.
Please refer to POP3QUEUE sample in ANPOP installation package.
Can I detect if an
email is new?
Basically, pop3 protocol doesn't support this function. However, you
can implement this with message-id. Message-Id is an unique identifier of email on
POP3 server. Your application can get message-id of a specified email by GetMsgID
method of POPMAIN object.
Firstly, your application should record message-id of email retrieved to a local
message-id list. Next time before you retrieve email, compare local message-id
with remote message-id. If this message-id exists in your
local message-id list, then it is old, otherwise it is new.
Please refer to VBSAMPLE4, VCSAMPLE1, POP3QUEUE samples in ANPOP installation
package.
Can I leave a copy of
email on pop3 server?
ANPOP doesn't delete email automatically from POP3 server.
Email is deleted only if Delete method of POPMAIN object is invoked.
So you can leave a copy of email on server by simply don't invoke delete method.
What is the difference
between Connect and SecureConnect method?
Connect method uses USER and PASS command to login POP3 server,
the password is in plain text, and all pop3 servers support this method.
SecureConnect method uses APOP command to login POP3 server,
password is encoded by MD5 arithmetic. It provides higher level of security,
not all POP3 server support ANPOP command however.
Parsing Email
Why is there a footer
in email body returned by GetBodyText method?
This footer is a limitation in trial version. It is useful to detect if your
license code is correct. If your license code is correct, this footer will
disappear.
How to parse and save
attachments?
You can use GetAttachmentCount to get the total count of attachments in an email.
You can then use SaveAttachment, SaveAttachmentAs or SaveAllAttachments
methods to save attachments.
SaveAttachment: save an attachment with its original name to specified directory.
SaveAttachmentAs: save an attachment with a new name to specified directory.
SaveAllAttachments: save all attachments to specified directory.
Any difference between
GetFrom, GetFromAddress and GetReplyTo?
GetFrom: the sender friendly name, eg: Paul
GetFromAddress: the sender email address, eg: test@adminsystem.net
GetReplyTo: the email address to reply, usually it is equal to GetFromAddress.
Why line break doesn't
work when I display the email body in browser?
It is because line break doesn't make sense to web browser, you should replace
line break with <br>.
usage example:
bodyText = Replace( bodyText, Chr(13)&Chr(10), "<br>")
How can I get the priority of
current email.
You can get priority using the following code:
[Visual Basic]
nPriority = CInt(oMsg.GetHeaderItem("X-Priority"))
Select Case nPriority
Case 1
'high
Case 4
'low
Case Else
'normal
End Select
How to detect if there
is an embedded picture/attachment in an email?
If GetContentID method returns "", then current attachment is an embedded
attachment, otherwise it isn't.
Email Storage
How does MSGSTORE
object store emails?
MSGSTORE stores email as .eml file in local disk. MSGSTORE also provides
comprehensive methods to save, delete, move email and mailbox.
Why do SaveAttachment,
ExportFile, SaveEmailById and etc fail?
It is likely that the current user doesn't have enough permission to
access file system resource. This often occurs in ASP/ASP.NET
applications. You can use ImpersonateUser method to run current
POPMSG/MSGSTORE object under another user's security context.
Can I access mailbox
of outlook/outlook express via MSGSTORE object?
No, you can't. Mailbox of MSGSTORE object and that of outlook are totally different.
However, you can still access Outlook mailboxs by MAPI and import those emails to
MSGSTORE mailboxs.
How can I store emails
in different locations for each user?
The default root directory of MSGSTORE object locates in current
directory of anpop.dll.
Normally, it is "C:\Program Files\AdminSystem.NET\ANPOP\MailFolders".
All mailbox created by MSGSTORE object will be located in sub-directory of this
root directory. You can use SetRootPath method to change this root directory.
Pop3 Queue
Why does Listen method
fail?
It is likely that specified listen port is used by other application.
You can solve it by changing the listen port to another one.
Why does SendRequest
method fail?
Please make sure background application is listening on the
specified port and ip address.
My background service
locates in another machine, can I send request to it?
Of course you can. You just need to specify the ip address in SendRequest method
to the ip address of the machine on which background application is running.
S/MIME
How can I get the certificate from email?
You can use VerifySignature method to get CAPICOM.SignedData object and
retrieve certificate from this object.
Note*: you need to add a reference of CAPICOM object in your project.
Why decrypt method fails?
It is likely that the certificate for the associated private key is not in
either the local computer MY store or the current user MY store. Therefore,
Installation/Deployment
How to
install/upgrade ANPOP?
Download ANPOP installer and run it on your machine.
Note for upgrade:
during installation stage if there is a message "anpop.dll can't be overwritten",
you should check if any other application is using ANPOP. If you are using ANPOP
in ASP/ASP.NET application, you should shutdown IIS application first or reboot your
machine, otherwise anpop.dll is protected by IIS and upgrade will be failed.
Any extra ocx, dll
does ANPOP depend on?
ANPOP is built on VC++/ATL, it doesn't depend on any extra ocx/dll
but winsock2.0 upgrade package if your application is running on windows95.
You can download winsock2.0
here: winsock2.0 update package for Windows 95
SSL/TLS Plus for ANSMTP/ANPOP:
Windows95: IE 5.0 or later is a MUST.
NT4.0: SP4 or later is a MUST.
How to
distribute/deploy ANPOP? Can I integrate it into my installer?
If you want to distribute/deploy without ANPOP installer.
1. copy anpop.dll to destination machine. (run-time file of ANPOP)
2. run "Regsvr32 [path]\anpop.dll" under dos prompt. (register ANPOP as com object)
3. If you used SSL/TLS Plus for ANSMTP/ANPOP, you also need to copy ansslplus.dll
to the same directory of anpop.dll.
4. If you want to send signed and encrypted email, then you need to copy
capicom.dll to the same directory of ansmtp.dll and
run "Regsvr32 [path]\capicom.dll under dos prompt. You can also use your
installer to do the above operations.
Note: You can only distribute ANPOP to multiple machines with Professional
or Enterprise License.
Miscellaneous
Can ANPOP send email?
No, you can't use ANPOP to send email, instead we provide another product
ansmtp which can compose and send email.
Does ANPOP support
SSL/TLS connection?
Yes, ANPOP supports SSL/TLS connection, but an extra SSL/TLS Plus license is
required in this case, more detail, please refer to SSL_registerkey property.
How to compile ANPOP with .NET Serviced Component/COM+?
You should manually import ANPOP to .NET Assembly with strong name.
Then add this assembly to your project.
How to import ANPOP to .NET Assembly with strong name?
run the following command under dos prompt.
rem generate a key file for ANPOP
sn -k ANPOPLib.snk
rem import anpop to .NET Assembly with this key file
tlbimp "C:\Program Files\AdminSystem.NET\ANPOP\ANPOP.dll" /keyfile:ANPOPLib.snk /out:ANPOPLib.dll /namespace:ANPOPLib
Finally you can refer to ANPOPLib.dll in your project.
Free Email Support
Not enough? Please contact our technical support team.
Support@EmailArchitect.NET
VIP@EmailArchitect.NET(Registered
User)
Remarks
We usually reply emails in 24hours. The reason for getting no response is
likely that your smtp server bounced our reply. In this case, please try to use
another email address to contact us. Your Hotmail or Yahoo email account is
recommended.