HTML Signature in Mail

Hi!

I am using Mail 1.8.0.

As i see on Github, Mail is support HTML signature.
But how to set it?

I tried it in Account Setting -> Signature -> set to <b>TEST</b>.
Nothing happend, send the HTML as text.
Here is a picture from an email sent from Mail to my Thunderbird:
image

Thanks!

Hello @g0rbe,

I can reproduce this error, probably is a regression. But can you please open a bug ticket on github: https://github.com/nextcloud/mail/issues/new/choose, since we track all the bugs from there.

Meanwhile we are checking the problem.

Thank you in advance.

Did you literally put that there? This input field is a rich text editor. If you highlight TEST you get the option to make it bold. Is that what you were looking for?

As it seems you inserted HTML into an already formatted input, hence this got HTML-escaped and therefore showed as HTML in the target email.

I want a more complex HTML signature, a fancy one with picture, links to website, etc. This was just a test.

I tried to insert HTML in signature with Writing mode set to Plain text or Rich text.

This is my setting:
image

And this is the result in Thunderbird:
image

Am i do something wrong?
How can i create an HTML signature?

Edit 1:

I created an example signature with a generator:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Email Signature</TITLE>
<META content="text/html; charset=utf-8" http-equiv="Content-Type">
</HEAD>
<BODY style="font-size:10pt; font-family:Verdana, sans-serif;">

<table style="width:450px;"  width="450" cellspacing="0" cellpadding="0">
 <tbody style="vertical-align:top;">
  <tr>
   <td colspan="2" style="border-bottom:1px solid; border-bottom-color:#008000; padding-bottom:10px; padding-top:0; padding-left:0; padding-right:0; vertical-align:top; font-family:Verdana, sans-serif; color:#3b4908;" valign="top">
    <strong><span style="font-family:Verdana, sans-serif; font-size:14pt; color:#008000">John&nbsp;Doe</span></strong><br>
    <span style="font-family:Verdana, sans-serif; font-size:10pt; color:#444444;"><span style="font-family:Verdana, sans-serif; color:#444444">Sales &amp; Marketing Director</span></span>
   </td>		
  </tr>		
  <tr>
   <td style="width:60%; padding-top:10px; padding-bottom:0; padding-left:0; padding-right:0; line-height:18px; vertical-align:top; font-family:Verdana, sans-serif; font-size:10pt; color:#444444;" width="60%" valign="top">
    <span style="font-family:Verdana, sans-serif; font-size:10pt; color:#444444">t: (800) 555-0199<span><br></span></span>
    <span style="font-family:Verdana, sans-serif; font-size:10pt; color:#444444">m: (800) 555-0299<span><br></span></span>				
    <span style="font-family:Verdana, sans-serif; font-size:10pt; color:#444444">e: john.doe@my-company.com</span>											
   </td>
   <td style="width:40%; padding-top:10px; padding-bottom:0; padding-left:0; padding-right:0; line-height:18px; vertical-align:top; font-family:Verdana, sans-serif; font-size:10pt; color:#444444;" width="40%" valign="top">
    <span style="font-family:Verdana, sans-serif; font-size:10pt; color:#444444">My Company<span><br></span></span>			
    <span style="font-family:Verdana, sans-serif; font-size:10pt; color:#444444">Street, City<span><br></span></span>
    <span style="font-family:Verdana, sans-serif; font-size:10pt; color:#444444">Zip Code, Country</span>
   </td>
  </tr>
  <tr>
   <td style="width:60%; padding-top:10px; padding-bottom:0; padding-left:0; padding-right:0; vertical-align:top" width="60%" valign="top">						
    <span><a href="https://www.linkedin.com/company/mycompany404" target="_blank" rel="noopener"><img alt="linkedin icon" style="margin-right:5px; margin-bottom:1px; border:0; width:16px; height:16px;" src="https://codetwocdn.azureedge.net/images/mail-signatures/generator-dm/plaintext3/ln.png" width="16" border="0"></a>&nbsp;</span><span><a href="https://www.facebook.com/MyCompany" target="_blank" rel="noopener"><img alt="facebook icon" style="margin-right:5px; margin-bottom:1px; border:0; width:16px; height:16px;" src="https://codetwocdn.azureedge.net/images/mail-signatures/generator-dm/plaintext3/fb.png" width="16" border="0"></a>&nbsp;</span><span><a href="https://twitter.com/MyCompany404" target="_blank" rel="noopener"><img alt="twitter icon" style="margin-right:5px; margin-bottom:1px; border:0; width:16px; height:16px;" src="https://codetwocdn.azureedge.net/images/mail-signatures/generator-dm/plaintext3/tt.png" width="16" border="0"></a>&nbsp;</span><span><a href="https://www.youtube.com/user/MyCompanyChannel" target="_blank" rel="noopener"><img alt="youtube icon" style="margin-right:5px; margin-bottom:1px; border:0; width:16px; height:16px;" src="https://codetwocdn.azureedge.net/images/mail-signatures/generator-dm/plaintext3/yt.png" width="16" border="0"></a>&nbsp;</span><span><a href="https://www.instagram.com/mycompany404/" target="_blank" rel="noopener"><img alt="instagram icon" style="margin-right:5px; margin-bottom:1px; border:0; width:16px; height:16px;" src="https://codetwocdn.azureedge.net/images/mail-signatures/generator-dm/plaintext3/it.png" width="16" border="0"></a>&nbsp;</span><span><a href="https://pinterest.com/mycompany404/" target="_blank" rel="noopener"><img alt="pinterest icon" style="margin-right:5px; margin-bottom:1px; border:0; width:16px; height:16px;" src="https://codetwocdn.azureedge.net/images/mail-signatures/generator-dm/plaintext3/pt.png" width="16" border="0"></a></span>
   </td>
   <td style="width:40%; padding-top:10px; padding-bottom:0; padding-left:0; padding-right:0; vertical-align:top" width="40%" valign="top">			
    <span><strong><a href="http://www.my-company.com" target="_blank" rel="noopener" style="text-decoration:none;"><span style="font-family:Verdana, sans-serif; font-size:10pt; color:#008000;"><span style="font-family:Verdana, sans-serif; color:#008000;">www.my-company.com</span></span></a></strong></span>		  
   </td>
  </tr>
 </tbody>
</table>
    
</BODY>
</HTML>

Expected result:

image

Result in Thunderbird:

So, can i get it as a NO?

We found a regression in our code. @Greta is working on this. Signatures are configured with a rich text editor, so we allow HTML formatting, but not any arbitrary input.

I get it.
Thanks @Greta and @ChristophWurst .

Fixed in Fix html signature format balloon by GretaD · Pull Request #4406 · nextcloud/mail · GitHub, I’ll release an update of v1.8 beginning of next week

1 Like

I have the same problem, and even with the latest version of today, I still can’t set a proper HTML signature.

Can we please get a radiobox that say HTML and we can provide our signature ?

Thanks you !!!

And just to be clear, I’ve seen the explanation of you using the editor and etc. But there are many question that come to mind then:

The “editor” is just a javascript pluggin that you grab the html generated and attach it to a mail object. Why can’t you just concat the message + the signature (untouch html code) ? It not like we “have” to be forced to use the editor to create a html signature and therefore end-up with non optimised html markup right ?

Then secondly, html can easily be sanitized in PHP using strip_tags() (simple/double encoded verification etc), so I don’t see why we couldn’t be just using a pure html code block, with basic table, div, br, b, i, span, etc ?

HTML E-Mail Signature would be a great feature, because adding some signature-pics would also be possible with base64 encoding and lots of users would need that!

I thought so too but it turns out base64 images are very poorly supported across many web-based email clients: Ability to load images in signatures · Issue #2733 · nextcloud/mail · GitHub

Why not simply use a remote image instead attaching it directly to the mail in whatever way?

In first place i think it’s enough to just allow HTML, so users are able to add the
<img src="https://mysite.com/logo.png">

And maybe add a logo upload field later and store the image in a public folder on the NC server.

Our company using it like this since years (in Thunderbird & Outlook), without a problem. Maybe it’s a problem if the image is served by another server, as the mail server where the mail has sent from? Never tried.

That won’t work out of the box due to the strict CSP.

I can’t put my HTML signature in the Nextcloud mail application…
My Signature: https://s.jordand.fr/Pq3Au5KInI.png
and in a message sending https://s.jordand.fr/P22hb6cWkc.png
My signature is not recognized in HTML format

it’s a rich text editor, not a html editor. use the formatting options instead of pasting raw html.

So if I understand correctly the mail editor doesn’t know how to handle HTML so the NEXTCLOUD mail application can’t be used in a professional world because most companies use HTML signatures.

1 Like

And how can we prevent the mail application from grouping our mails into conversations ?