2

How do I get thunderbird to send HTML and an image in a signature?

Just wanting to send a red dot in the signature file for as an example.

see also:

https://stackoverflow.com/q/44481019/262852

Thufir
  • 1,490
  • 7
  • 36
  • 57
  • forgot to enable HTML messages as per: https://askubuntu.com/questions/100797/how-do-i-configure-thunderbird-to-send-plain-text-emails-by-default – Thufir Jun 11 '17 at 08:52

2 Answers2

5

The url of the img is only valid to your computer and it is not valid at the receiver side. So you need to encode the image file using a base64 encoder like this one.

Upload the signature and convert it into base64.

Copy the code and replace the path in img tag with the code like this.

<br><img src="data:image/bmp;base64,Qk32BgAAAAAA...." alt="Signature">

Hope this helps.

CodeIt
  • 1,789
  • 1
  • 19
  • 28
  • I updated the question a bit. Need to use src="data:...." ? Don't want to include the file itself directly. – Thufir Jun 11 '17 at 05:36
  • @Thufir If your are not ready to include file itself directly then the image will only be visible to you. Others won't be able to see your image. For that you need to embed the image and send. – CodeIt Jun 11 '17 at 05:39
  • what I mean is I'd like to use `file:///whatever` instead of directly pasting the *data*. I wrote incorrectly about including the *file* directly. Of course I want to include the file, but would want to refer by file name and path. is that possible? – Thufir Jun 11 '17 at 05:43
  • 1
    @Thufir Does your email recipient have access to this path? If not then they won't be able to see this file. For them you must embed the image and send or serve from your website or public server – CodeIt Jun 11 '17 at 05:52
  • ohhhhhh, that's weird, didn't think of that. thx. – Thufir Jun 11 '17 at 05:55
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/60262/discussion-between-thufir-and-codeit). – Thufir Jun 11 '17 at 06:07
  • 1
    Images inserted like this are not visible in gmail for example. With how widespread gmail is this cannot be an acceptable answer. – David162795 Aug 30 '18 at 14:10
0

syntax is fine:

thufir@doge:~$ 
thufir@doge:~$ cat .tbird/sig.html

this is in <i>italics</i>
<br>
and something <em>emphasized</em>
<br>
here's some <b>bold</b>

<br>
<br>
<br>

<img moz-do-not-send="false" src="data:image/png;base64,
iVBORw0KGgoAAA
ANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4
//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU
5ErkJggg==" 

style="height:22px; width:22px"
alt="Signature"/>

thufir@doge:~$ 

forgot to enable HTML e-mail:

https://askubuntu.com/q/100797/45156

copied in reference from:

https://stackoverflow.com/a/44482049/262852

Thufir
  • 1,490
  • 7
  • 36
  • 57
  • 1
    Images inserted like this are not visible in gmail for example. With how widespread gmail is this cannot be an acceptable answer. – David162795 Aug 30 '18 at 14:10
  • how does gmail handle inserted images, then? – Thufir Sep 10 '18 at 21:11
  • It basically removes src attribut out of html (if it contains such inline data instead of http*) before displaying message, and the image without it is displayed as if it had broken url. – David162795 Sep 11 '18 at 11:02