Sample code for 30+ languages & platforms
Java

Create Email with Embedded Link

Creating an email with an embedded link (HTML hyperlink).

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[])
  {
    CkEmail email = new CkEmail();

    // To create an email with an embedded link, use HTML:
    String html = "<html><body><p>Click here for more information: <a href=\"http://www.chilkatsoft.com/\">Chilkat Software</a></body></html>";

    email.SetHtmlBody(html);

    // Continue building the email by adding the subject, recipients, etc...

    String mime;
    mime = email.getMime();
    System.out.println(mime);
  }
}