Sample code for 30+ languages & platforms
Java

Transition from MailMan.LoadMime to Email.SetFromMimeText

Provides instructions for replacing deprecated LoadMime method calls with Email.SetFromMimeText.

Chilkat Java Downloads

Java
import com.chilkatsoft.*;

public class ChilkatExample {

  static {
    try {
        System.loadLibrary("chilkat");
    } catch (UnsatisfiedLinkError e) {
      System.err.println("Native code library failed to load.\n" + e);
      System.exit(1);
    }
  }

  public static void main(String argv[])
  {
    boolean success = false;

    CkMailMan mailman = new CkMailMan();

    //  ...
    //  ...

    String mimeText = "....";

    //  ------------------------------------------------------------------------
    //  The LoadMime method is deprecated:

    CkEmail emailObj = mailman.LoadMime(mimeText);
    if (mailman.get_LastMethodSuccess() == false) {
        System.out.println(mailman.lastErrorText());
        return;
        }

    //  ...
    //  ...

    //  ------------------------------------------------------------------------
    //  Do the equivalent using Email.SetFromMimeText.

    CkEmail email = new CkEmail();
    success = email.SetFromMimeText(mimeText);
    if (success == false) {
        System.out.println(email.lastErrorText());
        return;
        }
  }
}