The first time I try to send letters using JavaMail. I send HTML, everything is okay, but I try to connect some styles, but they do not work (I opened the template page in the browser itself - everything is OK). It seems that somewhere in the English-speaking forums they wrote that there are some restrictions on HTML, then that JS is not so kind of intuitive, but what about styles? Are only inline styles available? Or is it somewhere I connect something wrong?

Well, the code, of course:

<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml"> <head> <meta charset="UTF-8"/> <title>Mail confirmation</title> <link href="https://bootswatch.com/flatly/bootstrap.min.css" rel="stylesheet"/> </head> <body> <div class="container"> <form class="col-md-4 col-md-offset-4" th:action="${link}"> <input type="submit" class="btn btn-block btn-success" value="Confirm"/> </form> </div> </body> </html> 

    1 answer 1

    Styles are all written inline right in the tags. It is necessary to use tabular layout. For example, you can download the http://tedgoas.imtqy.com/Cerberus/ template and turn it around much more clearly and clearly.