Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Fetch Multiple MIME Sources from POP3 ServerDownload: Chilkat .NET Assemblies Download multiple emails from a POP3 mailbox but instead of returning a Chilkat.EmailBundle, return a Chilkat.StringArray object containing a collection of MIME source strings. // FetchMultipleMime: Download multiple emails from a POP3 server directly into a collection of strings without parsing.
// The typical way of retrieving email from a POP3 mailbox using the Chilkat email component is
// is to return a Chilkat.EmailBundle object. Certain Chilkat customers with more advanced requirements
// wish to retrieve the exact MIME source of the email without it first being parsed and
// wrapped in a Chilkat.Email object. This example shows how to call FetchMultipleMime given a set of UIDLs.
private void downloadMultipleMimeSource()
{
Chilkat.MailMan mailman = new Chilkat.MailMan();
mailman.UnlockComponent("Anything for 30-day trial");
// Set our POP3 mail host and login
mailman.MailHost = "mail.chilkatsoft.com";
mailman.PopUsername = "****";
mailman.PopPassword = "****";
// For demonstration purposes, assume there is mail in the mailbox...
// This line of code retrieves the UIDLs for all the mail in the mailbox.
Chilkat.StringArray uidlArray = mailman.GetUidls();
// Download the entire mailbox into a Chilkat.StringArray
Chilkat.StringArray mimeSources = mailman.FetchMultipleMime(uidlArray);
// FetchMultipleMime leaves the email on the server. The TransferMultipleMime
// method is identical, except that it also deletes the email on the server after downloading.
if (mimeSources == null)
{
// It failed!
MessageBox.Show(mailman.LastErrorText);
return;
}
// Your program can do whatever it wants with the MIME.
// One possibility is to load it into a Chilkat.Email object...
Chilkat.Email email = new Chilkat.Email();
int n = mimeSources.Count;
int i;
for (i = 0; i < n; i++)
{
// Load the Nth MIME source into an email object.
email.SetFromMimeText(mimeSources.GetString(i));
// ...
}
}
Important: The download for this
example does not contain the ChilkatDotNet.dll which |
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.