Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mutt and HTML signatures

591 views
Skip to first unread message

Daniel Bareiro

unread,
Feb 25, 2012, 1:30:02 PM2/25/12
to

Hi all!

I was never very fond of sending emails in HTML format, but recently I
changed of job and when my boss saw I was using a company's signature
without the company logo, he asked me to put the pictures in the
signature. It seemed more a psychological than a real problem...

Is there any way to use HTML signatures with Mutt? More than 10 years
that I use Mutt and I would not like having to change it just for
this. I tried using a signature file with HTML code, but after reviewing
the receipt of the message, HTML code is seen rather than rendering.


Thanks in advance.


Regards,
Daniel
--
Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Lenny - Linux user #188.598
signature.asc

Bob Proulx

unread,
Feb 25, 2012, 2:50:02 PM2/25/12
to
Daniel Bareiro wrote:
> I was never very fond of sending emails in HTML format, but recently I
> changed of job and when my boss saw I was using a company's signature
> without the company logo, he asked me to put the pictures in the
> signature. It seemed more a psychological than a real problem...

And the psychology of it is producing the opposite problem of
propagating the use of html for email which I find very undesirable.

> Is there any way to use HTML signatures with Mutt? More than 10 years
> that I use Mutt and I would not like having to change it just for
> this. I tried using a signature file with HTML code, but after reviewing
> the receipt of the message, HTML code is seen rather than rendering.

No. You can't turn html on and off inline like that. What you will
get is plain text with the html markup content as plain text. (If I
am wrong, someone please jump in with an example.) You can only do it
by turning on html email so that the recipient sees html email. The
html part could have a logo but the plain text part can never have a
logo. It isn't possible.

The pushback you may get is that your boss probably always selects the
html email and doesn't realize the bad nature of it. This would be
standard with Gmail or Thunderbird or Outlook or other of those.

Note that the Debian mailing list code of conduct explicitly forbids
sending html mail to the mailing list. (See this page for it:
http://www.debian.org/MailingLists/#codeofconduct) Most technical
mailing lists forbid html email. If you were to turn on html email
when sending please do not turn it on for any public mailing list
discussion.

Let me spend a moment talking about mime mail encodings.

http://en.wikipedia.org/wiki/MIME

The mail standards allow you to send plain text email. That is email
the way it has always been. Plain text. Just send the message. This
is always good. The mime mail standards allow you to send mime
encoded email. This is useful for signed messages such as mine. The
mime standards allow you to send multipart alternative messages in the
different mime sections.

In multipart alternative both parts are supposed to be equivalent
parts. In theory you could send plain text, html text, audio files,
video files, image files or other all as equivalent parts of the same
message. The recipient's MUA would then select the most appropriate
part for display. In theory they might be listening to your voice
read the message instead of seeing text on the page. But in practice
this is only done with plain text and html text. Therefore the
idea is that a sender can send a message as both plain text and as
html text in the two separate parts. Then the recipient reading the
message will display the part that is desired for their environment.

In my environment this is always plain text. I try to avoid the need
to fire up lynx, w3m, elinks, or links to read a mail message. I
really, really try to avoid firing up Firefox or Chromium to read an
email message.

If you are following along so far you will realize that the only
practical way to get an image in your email is if your entire email is
formatted as html text. Your boss would then be seeing the html text
version of the email and would get the logo. But that would alienate
you from the sane portion of the world such as the technical mailing
list forums.

Additionally getting an image into html messages isn't a simple
question either. You have a couple of choices. You can reference the
image as a full external url link. http://www.example.com/image.png
or some such. But most mail user agents will have concern for
security. Those types of things are often used by spammers. The link
may have identifying information or web-bugs in them to track you.
That is all bad too. Therefore safe mailers will not display that
content to you. At the least they will offer the choice to you for
you to decide if you want to fetch those images from the net.

Alternatively you can include the base64 encoded binary blob of the
image inline in the email message. That avoids the problem of
fetching the image from the network. However it bloats the email
messages to be *HUGE*. Additionally it isn't entirely safe either.
There have been many buffer overflow attacks against various image
formats.

I think you see that by now trying to do what your boss thinks is
trivial is really just a very big step into the abyss. (Look for the
discussion of Virgil earlier on this list. It isn't too often we get
to discuss classical literature and modern computer theory in the same
discussion thread. <grin>)

Bob
signature.asc

Camaleón

unread,
Feb 26, 2012, 10:30:01 AM2/26/12
to
On Sat, 25 Feb 2012 15:27:09 -0300, Daniel Bareiro wrote:

> I was never very fond of sending emails in HTML format, but recently I
> changed of job and when my boss saw I was using a company's signature
> without the company logo, he asked me to put the pictures in the
> signature. It seemed more a psychological than a real problem...

I feel your pain :-)

> Is there any way to use HTML signatures with Mutt? More than 10 years
> that I use Mutt and I would not like having to change it just for this.
> I tried using a signature file with HTML code, but after reviewing the
> receipt of the message, HTML code is seen rather than rendering.

Sure! You can just create html encoding messages with "Ctrl+T" (default
combo) and change the "Content-Type:" header field to "text/html" instead
"text/plain". Then write down (or append) html code tags on your message -
or signature template- and that should be all.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/jidinc$69j$2...@dough.gmane.org

Daniel Bareiro

unread,
Feb 26, 2012, 5:10:02 PM2/26/12
to
On Sunday, 26 February 2012 15:22:20 +0000,
Camaleón wrote:

> > I was never very fond of sending emails in HTML format, but recently
> > I changed of job and when my boss saw I was using a company's
> > signature without the company logo, he asked me to put the pictures
> > in the signature. It seemed more a psychological than a real
> > problem...

> I feel your pain :-)

You sound like Master Yoda :-D

I hope this is not the way to the dark side...

> > Is there any way to use HTML signatures with Mutt? More than 10
> > years that I use Mutt and I would not like having to change it just
> > for this. I tried using a signature file with HTML code, but after
> > reviewing the receipt of the message, HTML code is seen rather than
> > rendering.

> Sure! You can just create html encoding messages with "Ctrl+T"
> (default combo) and change the "Content-Type:" header field to
> "text/html" instead "text/plain". Then write down (or append) html
> code tags on your message - or signature template- and that should be
> all.

Interesting... the problem is to manually type the text with HTML tags
is depressing. Is there any command line HTML editor can be used with
Mutt?

It also occurs to me that another alternative would be to write the
message body in plain text as one normally does, then to have some
process to attach the HTML version for that version in plain text, each
with its signature in plain text and HTML as appropriate. Is that
possible?

A few annoyances that must be taken to add two silly pictures when there
are more important things as using the time to more productive things as
working.

> Greetings,

Thanks for your reply.
signature.asc

Mailinglist

unread,
Feb 26, 2012, 5:20:01 PM2/26/12
to
I would be interested for a solution.

Regards,
Alvin
--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/C189B166-FCA9-4F24...@theflux.net

Camaleón

unread,
Feb 27, 2012, 8:00:02 AM2/27/12
to
On Sun, 26 Feb 2012 19:07:59 -0300, Daniel Bareiro wrote:

> On Sunday, 26 February 2012 15:22:20 +0000, Camaleón wrote:

(...)

>> I feel your pain :-)
>
> You sound like Master Yoda :-D
>
> I hope this is not the way to the dark side...

I still have to think about that >>:-)

>> > Is there any way to use HTML signatures with Mutt? More than 10 years
>> > that I use Mutt and I would not like having to change it just for
>> > this. I tried using a signature file with HTML code, but after
>> > reviewing the receipt of the message, HTML code is seen rather than
>> > rendering.
>
>> Sure! You can just create html encoding messages with "Ctrl+T" (default
>> combo) and change the "Content-Type:" header field to "text/html"
>> instead "text/plain". Then write down (or append) html code tags on
>> your message - or signature template- and that should be all.
>
> Interesting... the problem is to manually type the text with HTML tags
> is depressing. Is there any command line HTML editor can be used with
> Mutt?

Uf, maybe you're asking too much for a text based MUA :-)

I know you can instruct Mutt to use an external editor of your choice
(and thus you can call any html editor of your liking) but I'm not sure
if that solution will work fine or if there is a better way to get the
job done.

I would definitely ask this at Mutt's mailing list, although my guess is
that people in there won't be very much interested in such things like
seeing html code in their lovely e-mail client they can be able to tell
you the best ways to do this and maybe even some alternatives (like
having a set of templates or pre-formatted messages...).

> It also occurs to me that another alternative would be to write the
> message body in plain text as one normally does, then to have some
> process to attach the HTML version for that version in plain text, each
> with its signature in plain text and HTML as appropriate. Is that
> possible?

Yup, I think it can be feasible.

Anyway, what I do (and usually gives me the best results) is keep things
separate: at work I use Thunderbird that allows me send/receive all that
fancy messages with that big banners and company signatures, disclaimers
at the bottom, et al. For my own stuff, I use Mutt with my Gmail account
and a newsreader for mailing lists.

Just another possibility for your consideration.

> A few annoyances that must be taken to add two silly pictures when there
> are more important things as using the time to more productive things as
> working.

Agree.

Moreover, my guess is that if you only need to put some basic html code
in the signature, you can set two Mutt profiles: one for html and another
for text based messages with a predefined "Content-Type:" header on each
them so you don' have to start making changes on the fly. Also, for the
html profile you can define a signature with the required code and write
the body of the message with no formatting at all. While this is not
compliant to html coding standards, I think that most of the MUA will
render the message just fine, so maybe something worth to try.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/jifu90$288$3...@dough.gmane.org
0 new messages