Script sending raw mail (without added mime info)

Status
Not open for further replies.

larni

Cadet
Joined
Apr 27, 2012
Messages
1
Hi,

I am using some scripts that sends miscellaneous html formatted status messages from my server. In the earlier 8.0.1 release I used msmtp to send email where I added the mime info myself into the body.

In 8.0.4 msmtp is not available and I thought I could use mail instead (recommended in another thread).

Example:
# echo "fie foe fum" | mail -s "ABCD" ****@gmail.com

The problem is that the mail handling in FreeNas adds mime information to the message.

Received message:
...
Content-type: text/plain; charset=utf-8
MIME-version: 1.0
Content-transfer-encoding: quoted-printable
Subject: ABCD
From: ****@gmail.com
To: ****@gmail.com
Date: Fri, 27 Apr 2012 21:27:53 +0000

fie foe fum

So anything I add to the mail body (including my own mime info e.g. "Content-Type: text/html") comes out in plain text.

Can I force the mail client to send the raw body data?
Or can I specify mime information in some config file somewhere?

/larni
 

talon42

Dabbler
Joined
May 15, 2012
Messages
33
Did you ever figure this out? I haven't been able to successfully get the email to work from shell in 8.2. The gui test works. What did you have to configure to get the mail to work? Did you have to do anything with the sendmail.cf?
 
Status
Not open for further replies.
Top