Archived Forum Post

Index of archived forum posts


Cannot load To and From fields from eml.

Mar 01 '16 at 00:34


I am using CkEmail to load the eml from its path and extract the To, From, Subject, Body etc fields from it as below, CkMailMan mailman = new CkMailMan(); mailman.UnlockComponent("anything");

           File htmlEmail = new File("MyPath");
           CkEmail emailToRead = new CkEmail();

           new File(this.getCacheDir(), "EmailData").mkdir();

           String strSubject = emailToRead.subject();
           String strBody =  emailToRead.getPlainTextBody();
           String strFrom = emailToRead.fromAddress();

           String strTo = new String("");
           Boolean bShouldInsertSeperater = false;
           for (int i = 0; i < emailToRead.get_NumTo(); i++) {                   
                    strTo = strTo + ",";                  
                    strTo = strTo + emailToRead.getTo(i);

The above code used to work first. I was able to get all the Subject, Body, To and From fields correctly.

Now that i have included CkRsa and CkCrypt2 for using signHashENC and VerifyHashENC in Android, unfortunately the above CkEmail does not extract all the email contents. I get empty result while extracting 'To' and 'From' fields from the respective eml.

The chilkat version I am using is v9.5.0.55

Badly stuck here... any help will be appreciated. Thanks in advance.