You are not logged in.

#1 2014-01-30 08:49:28

YCH
Member
Registered: 2014-01-28
Posts: 53

`mail` command doesn't see custom mime header(for html contents).

Hello,

I'm trying to send some .htm files to my gmail account regularly. I've tried with mail command. It works well with plain text. But I want send .htm file as is(e.g. mail client like thunderbird can render them as html + css).

I've tried like this,

cat Downloads/contents.htm |\
mail -v GMAIL@ADDRESS
...(snip)...
$ head Downloads/contents.htm
Subject: TEST
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Disposition: inline

<html><!--
 Archive processed by SingleFile 
...(snip)...

Transmission was OK. But msg body was shown as plain text. This is raw message received.

Return-Path:
Received: from 
 Jan 2014 00:40:40 -0800 (PST)
Date: Thu, 30 Jan 2014 17:40:36 +0900
From: 
To: 
Message-ID: 
User-Agent: mail v14.5.2
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

=EF=BB=BFSubject: TEST
MIME-Version: 1.0
Content-Type: text/html; charset=3D"utf-8"
Content-Disposition: inline

<html><!--
 Archive processed by SingleFile=20
...(snip)...

$ pacman -Qo /usr/bin/mail
/usr/bin/mail is owned by s-nail 14.5.2-1

How can I let mail recognize custom mime header?

I'm wondering what is decent way for this sort of job. Is there any simple command line mail sender for batch processing? man mail is somewhat verbose to casual user.

Thanks.

Last edited by YCH (2014-01-30 08:52:36)


YCH

Offline

Board footer

Powered by FluxBB