title: Use Velocity to generate HTML based email
body: <p>I try this tutorials <a href="http://www.java2s.com/Code/Java/Velocity/UseVelocitytogenerateHTMLbasedemail.htm" rel="noreferrer">http://www.java2s.com/Code/Java/Velocity/UseVelocitytogenerateHTMLbasedemail.htm</a>
  but, when i add css, it look like not executed.</p>
  
  <pre><code>&lt;HTML&gt;
  &lt;HEAD&gt;
    &lt;TITLE&gt;Pet Store Sale!&lt;/TITLE&gt;
    &lt;style type="text/css"&gt;
      body    {
              margin: 0 0 0 0;
              padding: 0 0 0 0;
              text-align: center; 
              background-color: #FFF;
              border-top: 3px solid #CCC;
              }
  
  
      #container  {
                  position: relative;
                  width: 860px;
                  height: 1600px;
                  margin: 84 auto 0 auto;
                  padding: 0 0 0 0;
                  background-color: #FFF;
                  }
  
  
      p       {
              font-family: times, Times New Roman, times-roman, georgia, serif;
              color: #444;
              margin: 0 0 0 0;
              padding: 0 0 0 0;
              text-align: center;
              }
  
  
      .woodtwo        {
                      font-size: 22px;
                      line-height: 46px;
                      letter-spacing: -1px;
                      }
  
  
      .eyebrow        {   
                      font-size: 19px;
                      line-height: 29px;
                      }
  
  
      .caps           {
                      font-size: 14px;
                      line-height: 20px;
                      text-transform: uppercase;
                      }
  
  
      .copyone        {
                      font-size: 16px;
                      line-height: 20px;
                      }
  
  
      #line           {
                      border-bottom: 1px solid #CCC;
                      width: 748px;
                      margin: 10 0 20 56;
                      }
  
  
  
      #break          {
                      height: 30px;
                      }
  
  
      a:link          { color: #B95E27; text-decoration: none; } 
      a:visited       { color: #B95E27; text-decoration: none; }
      a:active        { color: #1A69A1; text-decoration: none; } 
      a:hover         { color: #888; text-decoration: none;}
  
  
      .grey           { color: #888; }
  
  
      .smallcaps      { font-size: 88%; }
  
  
  &lt;/style&gt;
  &lt;/HEAD&gt;
  &lt;BODY&gt;
  
  &lt;div id="container"&gt;
      &lt;p class="caps"&gt;&lt;a href=""&gt;From Pet Store Sale&lt;/a&gt;&lt;/p&gt;
      &lt;div id="line"&gt;&lt;/div&gt;
      &lt;p class="eyebrow"&gt;
          &lt;span class="grey"&gt;*&lt;/span&gt;T&lt;span class="smallcaps"&gt;HANK YOU FOR JOINING &lt;/span&gt;P&lt;span class="smallcaps"&gt;ET&lt;/span&gt; S&lt;span class="smallcaps"&gt;TORE&lt;/span&gt; S&lt;span class="smallcaps"&gt;ALE&lt;/span&gt; A&lt;span class="smallcaps"&gt;PPLICATION&lt;/span&gt;&lt;span class="grey"&gt;*&lt;/span&gt;
      &lt;/p&gt;
      &lt;p class="copyone"&gt;
          &lt;i&gt;You received this email because your registration process in Pet Store Sale is successful.&lt;br/&gt;
          To Confirm your registration, please visit this link &lt;a href ="$link"&gt;Confirmation Link&lt;/a&gt;.&lt;br/&gt;
          Your username : $username&lt;br/&gt;
          Password : $password&lt;br/&gt;
          If you have any questions about Application, please send an email to &lt;a href="mailto:admin@store.com"&gt;admin@store.com&lt;/a&gt;&lt;/i&gt; 
          &lt;br&gt;&lt;br&gt;&lt;b&gt;THANK YOU&lt;/b&gt;
      &lt;/p&gt;
      &lt;div id="break"&gt;&lt;/div&gt;
  
      &lt;p class="woodtwo"&gt;
          &lt;a href=""&gt;GETTING STARTED&lt;/a&gt;
      &lt;div id="line"&gt;&lt;/div&gt;
      &lt;div id="line"&gt;&lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/BODY&gt;
  &lt;/HTML&gt;
  </code></pre>
  
  <p>i've also tried </p>
  
  <pre><code>&lt;link rel="stylesheet" href="./style/css/emailFormat.css" type="text/css"  media="screen" /&gt;
  </code></pre>
  
  <p>but it not work too.
  how the right way to add css on to this page. Thank you</p>