rules & html e-mail codes

cancel
Showing results for 
Search instead for 
Did you mean: 
aa3w
Member II

rules & html e-mail codes

Hi together,

Alfresco has e-mail templates like this:

<html>
   <head>
      <style type="text/css"><!--
      body
      {
         font-family: Arial, sans-serif;
         font-size: 14px;
         color: #4c4c4c;
      }
      
      a, a:visited
      {
         color: #0072cf;
      }
      --></style>
   </head>
   
   <body bgcolor="#dddddd">
      <table width="100%" cellpadding="20" cellspacing="0" border="0" bgcolor="#dddddd">
         <tr>
            <td width="100%" align="center">
               <table width="70%" cellpadding="0" cellspacing="0" bgcolor="white" style="background-color: white; border: 1px solid #aaaaaa;">
                  <tr>
                     <td width="100%">
                        <table width="100%" cellpadding="0" cellspacing="0" border="0">
                           <tr>
                              <td style="padding: 10px 30px 0px;">
                                 <table width="100%" cellpadding="0" cellspacing="0" border="0">
                                    <tr>
                                       <td>
                                          <table cellpadding="0" cellspacing="0" border="0">
                                             <tr>
                                                <td>
                                                   <img src="${shareUrl}/res/components/images/page-64.png" alt="" width="64" height="64" border="0" style="padding-right: 20px;" />
                                                </td>
                                                <td>
                                                   <div style="font-size: 22px; padding-bottom: 4px;">
                                                      ${person.properties.firstName} <#if person.properties.lastName?exists> ${person.properties.lastName}</#if> hat ein neues Inhaltselement, ${document.name}, zur Site ${document.siteShortName!""} hinzugefügt
                                                   </div>
                                                   <div style="font-size: 13px;">
                                                      ${date?datetime?string.full}
                                                   </div>
                                                </td>
                                             </tr>
                                          </table>
                                          <div style="font-size: 14px; margin: 12px 0px 24px 0px; padding-top: 10px; border-top: 1px solid #aaaaaa;">
                                             <p>Hallo,</p>

                                             <p>${person.properties.firstName}
                                             <#if person.properties.lastName?exists> ${person.properties.lastName}</#if>
                                             hat ein neues Inhaltselement, ${document.name}, zur Site ${document.siteShortName!""} hinzugefügt.
                                             
                                             <p>Klicken Sie auf diesen Link, um das Element anzuzeigen:<br />
                                             <br />${document.shareUrl}</p>
                                             
                                             <p>Mit freundlichen Grüßen<br />
                                             Alfresco</p>
                                          </div>
                                       </td>
                                    </tr>
                                 </table>
                              </td>
                           </tr>
                           <tr>
                              <td>
                                 <div style="border-bottom: 1px solid #aaaaaa;">&nbsp;</div>
                              </td>
                           </tr>
                           <tr>
                              <td style="padding: 10px 30px;">
                                 <img src="${shareUrl}/themes/default/images/app-logo.png" alt="" width="117" height="48" border="0" />
                              </td>
                           </tr>
                        </table>
                     </td>
                  </tr>
               </table>
            </td>
         </tr>
      </table>
   </body>
</html>

When I edit or cut an paste the same code, then I get an e-mail with the variable.

${person.properties.firstName} <#if person.properties.lastName?exists> ${person.properties.lastName} hat ein neues Inhaltselement, ${document.name}, zur Site ${document.siteShortName!""} hinzugefügt 
${date?datetime?string.full} 

How can I use own codes?

2 Replies
sanjaybandhniya
Intermediate

Re: rules & html e-mail codes

These email templartes are bind to particular activities so from there(java), variable are passed(person,date).

If you want to use same thing for your email so you need to bind variable.

aa3w
Member II

Re: rules & html e-mail codes

How can I do this?