Я пытаюсь внедрить автоответчики на сервере, используя Dovecot Sieve.Мне удалось создать ситовые скрипты с простым html, который работает, однако при попытке реализовать более сложный html я получаю синтаксические ошибки.
Как мне сформулировать ситовый скрипт, чтобы учесть более сложный html?Как я могу исправить синтаксические ошибки?
Параметр: mime должен быть заключен в кавычки, и я думаю, что именно там он ломается.Но я попытался найти руководство о том, как правильно кодировать скрипт, и я не могу его найти.
Например, этот код работает ...
require ["fileinto","vacation"];
vacation
:subject "subject here"
:mime "MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html><html><head></head><body>12345</body></html>";
Но это не так ...
require ["fileinto","vacation"];
vacation
:subject "subject here"
:mime "MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="utf-8"> <!-- utf-8 works for most cases -->
<meta name="viewport" content="width=device-width"> <!-- Forcing initial-scale shouldn't be necessary -->
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- Use the latest (edge) version of IE rendering engine -->
<meta name="x-apple-disable-message-reformatting"> <!-- Disable auto-scale in iOS 10 Mail entirely -->
</head>
<body width="100%" style="background: #ffffff; margin: 0; mso-line-height-rule: exactly;">
<center style="width: 100%; background: #ffffff; text-align: left;">
<div style="max-width: 680px; margin: auto;" class="email-container">
<!-- Email Header : BEGIN -->
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 680px;">
<tr>
<td style="padding: 40px 20px; text-align: center">
<img src="logo.png" width="300" height="47" alt="alt_text" border="0" style="height: auto; background: #ffffff; font-family: sans-serif; font-size: 15px; line-height: 140%; color: #555555;">
</td>
</tr>
</table>
<!-- Email Header : END -->
<!-- Email Body : BEGIN -->
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="max-width: 680px;" class="email-container">
<!-- 1 Column Text : BEGIN -->
<tr>
<td bgcolor="#ffffff">
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="padding: 20px; font-family: sans-serif; font-size: 15px; line-height: 140%; color: #555555;">
test
</td>
</tr>
</table>
</td>
</tr>
<!-- 1 Column Text : END -->
</table>
<!-- Email Body : END -->
</div>
</td>
</tr>
</table>
</center>
</body>
</html>";
Сообщения об ошибках
Unable to parse script: script errors:
line 16: syntax error, unexpected $undefined, expecting ';'
line 68: unexpected end of file in string