BASE64 Decode with Charset GB2312

Question: I have a Base64 decode error, as follows: CkString str; str.setString(“16q”); str.base64Decode(“gb2312”); const char *strResult = str.getString(); convert result is { cb f2 } But the correct result should be { d7 aa} What’s wrong? The platform is WinCE 6.0, use Chilkat_PPC_M5.lib Answer: The following code shows how to do it correctly: CkString str; str.setString(“16q”); // The following line […]

Scan/Replace Text in Email Body in C++

This example may help C++ programmers needing to scan email bodies for strings and automatically replace: void EmailBodyExample(void) { CkEmail email; // Set the plain-text and HTML alternative bodies. // Note: Because we’re using literal strings, the strings passed // to these methods are ANSI strings (i.e. they are 1-byte per char // in this case). email.AddPlainTextAlternativeBody(“á, é, í, ó, […]

Chilkat 9.0.4 Release Notes

C++ Libraries Removed internal calls to setlocale so that the locale is never changed from whatever your application may have set it to. Compression Fixed rare PPMD crash. DSA Fixed LoadText method in DSA ActiveX. FTP2 Two additional modes added to SyncLocalTree: mode 5 – Download only missing files or files with size differences. mode 6 – Same as mode […]

Delete POP3 Email Based on Date / Age?

Question: Is it possible to delete email sitting on the POP3 server based on its age? For example, have it only delete mail from server older than 5 days. Answer: The POP3 protocol itself does not have the direct ability to delete email based on date/time (or any other selection criteria).  The POP3 protocol only provides the ability to delete […]

POP3 or IMAP for MS Exchange Server?

Question: I would like to use your product to process mail on an MS Exchange server. Which product should I use; Chilkat MAIL or Chilkat IMAP? I saw in your examples that I can use both to connect to an Exchange server MAIL with Pop3 and IMAP for a direct login on the server but which one is the best […]

SFTP Append to Existing File

To append to an existing file using the Chilkat SFTP component / library, open the file for “writeOnly” and “openExisting”, then call any of the Write* methods (such as WriteFileText or WriteFileBytes), and then close the handle by calling CloseHandle. As always, if a method returns a failed status, check the contents of the LastErrorText property.

BounceAddress w/ SendMimeBytes and SendMime

Question: I use SendMimeBytes Method of Mailman object to send Domain Keys Verified e-mails. But when I use this method  I can’ t use BounceAddress property to set up bounce addresses. For this reason I can’t get bounced e-mails as I want. When I use SendMail Method everything is ok. What should I do to get bounce messages the address […]

SFTP Progress Monitoring and Abort (C#)

Here is an example for monitoring the progress of an SFTP file transfer: void sftp_OnPercentDone(object sender, Chilkat.PercentDoneEventArgs args) { progressBar1.Value = args.PercentDone; // To abort at any point, you may set args.Abort = true // args.Abort = true; } void sftp_OnAbortCheck(object sender, Chilkat.AbortCheckEventArgs args) { // See https://cknotes.com/?p=149 for more information about // using the AbortCheck event… } private void […]

SFTP Upload in VB6 with Progress Monitoring

The PercentDone event is called when the percentage completion increases by one or more points.  To use events in VB6, Dim the variable WithEvents.  Then name the event callback using the variable name.  (You should already understand how to use VB6 events in general prior to using the Chilkat objects.  A good VB6 book is “Programming Visual Basic 6.0” by […]