Nie można przetestować akcji niestandardowych GMail

Próbowałem przetestowaćDziałania GMail przez kilka dni, ale to nie działa. Ponieważ nie jestem zarejestrowany, używam poniższego fragmentu kodu Java, aby wysłać do siebie wiadomość e-mail od siebie za pomocą serwerów smtp GMail. Ciało wiadomości jest bezpośrednią kopią z dokumentacji.

Jednak działa wersja aplikacji Script.

final String username = "[email protected]";
final String password = "X";

Properties props = new Properties();
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.host", "smtp.gmail.com");
props.put("mail.smtp.port", "587");

Session session = Session.getInstance(props,
        new javax.mail.Authenticator() {
            protected PasswordAuthentication getPasswordAuthentication() {
                return new PasswordAuthentication(username, password);
            }
        });

try {

    Message message = new MimeMessage(session);
    message.setFrom(new InternetAddress(username));
    message.setRecipients(Message.RecipientType.TO,
            InternetAddress.parse(username));
    message.setSubject("Testing Subject");
    message.setContent("<html>" +
            "  <head>" +
            "    <script type=\"application/ld+json\">" +
            "    {" +
            "      \"@context\": \"http://schema.org\"," +
            "      \"@type\": \"EmailMessage\"," +
            "      \"description\": \"Check this out\"," +
            "      \"action\": {" +
            "        \"@type\": \"ViewAction\"," +
            "        \"url\":   \"https://www.youtube.com/watch?v=eH8KwfdkSqU\"" +
            "      }" +
            "    }" +
            "    </script>" +
            "  </head>" +
            "  <body>" +
            "    <p>" +
            "      This a test for a Go-To action in Gmail." +
            "    </p>" +
            "  </body>" +
            "</html>", "text/html; charset=utf-8");

    Transport.send(message);

    System.out.println("Done");

} catch (MessagingException e) {
    throw new RuntimeException(e);
}

questionAnswers(1)

yourAnswerToTheQuestion