It does not give possibility to insert html E-mail Signature

Missing email signature. How can such a basic feature be lacking on such a large platform?

Search for “HTML signature” or just “signature” here: GitHub - nextcloud/mail: 💌 Mail app for Nextcloud and you’ll find several issues, where this, and similar features like logos in the signature, are discussed extensively…

I have the same problem and the same thought. “As a robust platform, one simple thing is missing.”

This issue explains the situation nicely and links to other relevant issues. Bottom line is a ton of work has gone into this, but nothing about it has been simple. Looks like it is very close, but still some bugs.

NextCloud devs should pay attention to this request. I’ve already accessed all the topics, including this one, also without solution. I believe that such a feature should be implemented on the platform, as it is a basic feature that many people need, especially when it comes to the use of internal compliance by companies.

The feature, HTML signature, is really needed, otherwise there wouldn’t be so many topics on the NextCloud Forum and GitHub.

No one says otherwise, but it seems like it’s not quite that easy to implement, for various reasons which are also explained in the relevant Issues. However, if you can provide a solution to one of these issues, feel free to submit a pull request…

<?php
// Trecho de código HTML que você deseja transformar em assinatura HTML
$htmlCode = '<p>Exemplo de assinatura HTML</p>';

// Função para escapar caracteres especiais em HTML
function escapeHtml($string) {
    return htmlspecialchars($string, ENT_QUOTES | ENT_HTML5, 'UTF-8');
}

// Função para envolver o código HTML em tags de assinatura
function generateSignature($html) {
    return '<html>
                <head>
                    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
                </head>
                <body>
                    '.$html.'
                </body>
            </html>';
}

// Escapa o trecho de código HTML
$escapedHtml = escapeHtml($htmlCode);

// Gera a assinatura HTML completa
$signature = generateSignature($escapedHtml);

// Exibe a assinatura
echo $signature;
?>


Você pode copiar esse código PHP em um arquivo com extensão .php e executá-lo no seu servidor Nextcloud. Ele irá escapar o código HTML fornecido e envolvê-lo em tags <html>, <head> e <body>, criando assim uma assinatura HTML válida.

Lembre-se de substituir o trecho de código HTML de exemplo (<p>Exemplo de assinatura HTML</p>) pelo seu próprio código HTML.

Have a go and put that into the app. I’ll await your pull request. See you on Github.

1 Like