Previously send_email was part of CloverWeb. This makes it difficult to send an email in contexts outside of the web application. Sending mail requires setting up a whole web app, which is not a lightweight operation. The reason of putting send_email in CloverWeb was to have access to render plugin, because we need to render html pages as a part of email content. render plugin is part of roda, so it is not available outside of roda app. In this commit, I implemented a simple EmailRenderer. It is a wrapper around Tilt::ErubiTemplate, which is the same as what is used in roda's render plugin. With the new renderer, we can render templates without having to set up a roda app and send emails from any context. This also unblocks sending monthly emails for invoices.
24 lines
588 B
Plaintext
24 lines
588 B
Plaintext
<% require "date" %>
|
|
<tr>
|
|
<td>
|
|
<table class="footer" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
|
|
<tr>
|
|
<td align="left">
|
|
<p>
|
|
©
|
|
<%= Date.today.year %>
|
|
Ubicloud. All rights reserved.
|
|
</p>
|
|
</td>
|
|
<td align="right">
|
|
<a href="https://github.com/ubicloud/ubicloud" class="icon">
|
|
<%== render("components/icon", locals: { name: "github", classes: "" }) %>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|