Java
Java
Transition from Email.CreateReply to Email.ToReply
Provides instructions for replacing deprecated CreateReply method calls with ToReply.Chilkat Java Downloads
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;
CkEmail email = new CkEmail();
// ...
// ...
// ------------------------------------------------------------------------
// The CreateReply method is deprecated:
CkEmail emailObj = email.CreateReply();
if (email.get_LastMethodSuccess() == false) {
System.out.println(email.lastErrorText());
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using ToReply.
// Your application creates a new, empty Email object which is passed
// in the last argument and filled upon success.
CkEmail emailOut = new CkEmail();
success = email.ToReply(emailOut);
if (success == false) {
System.out.println(email.lastErrorText());
return;
}
}
}