Liferay 6.2 电子邮件通知中的自定义字体系列

Liferay 6.2 Custom Font family in email notifications

我想知道如何更改电子邮件通知正文的字体系列。

关于一般邮件通知,控制面板编辑器不提供这种可能性。

关于工作流邮件通知和其他 portlet 邮件通知 像留言板或日历,我仍然看不到这种可能性。

任何帮助将不胜感激。

问题很棘手,但我们找到了可行的解决方案。我们设法在我们的项目中使用 kaleo 工作流通知解决了这个问题。我假设您已经了解如何使用 kaleo,所以这里只是我们工作流定义中使用的代码的一部分,负责在用户采取的一项操作中发送电子邮件通知。

    <notification>
                <name>Creator Modification Email Notification</name>
                <description>[Rejection] Your article has been rejected.</description>
                <template>
                    <![CDATA[
                    <html>
                        <head><style>table, th, td {border: 1px solid black; border-collapse: collapse;}th, td { padding: 5px;text-align: left;}</style><head>
                        <body>
                            <p>Lorem ipsum...</p>
                            ###....
                            ##some settings removed to make it look more clear
                            ##


                            <table>
                                <tr><th colspan="2"><b>Some information about rejected article</b></th></tr>
                            ## another information removed to make it look more clear for you
                            </table>
                        </body>
                ]]>
                </template>
                <template-language>velocity</template-language>
                <notification-type>email</notification-type>
                <execution-type>onAssignment</execution-type>
            </notification>

如您所见,我们使用 html 来呈现此通知电子邮件。 css 的一部分也包含在 header 部分中,以使最终用户看起来更优雅。添加更多指定的 css 样式包括字体等应该没有任何问题。

顺便说一句:确保 将此工作流定义上传为 xml,因为半年前存在一个错误,该错误会清除所有特殊字符的定义,最后,您无法使用此类模板。这仍然可以使用他们的 liferay 上传器并使用你的 workflow_definition.xml 文件。我希望我以某种方式帮助你,解决这个问题。