From owner-freebsd-questions@FreeBSD.ORG Wed Mar 24 12:14:02 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBEF6106566C for ; Wed, 24 Mar 2010 12:14:02 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 44DD88FC22 for ; Wed, 24 Mar 2010 12:14:01 +0000 (UTC) X-Spam-Status: No X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-2.9, required 5, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_00 -1.90) X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-ID: o2OCDmNZ007140 Received: from kobe.laptop (ppp-94-64-232-168.home.otenet.gr [94.64.232.168]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-9.1) with ESMTP id o2OCDmNZ007140 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 24 Mar 2010 14:13:54 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.4/8.14.4) with ESMTP id o2OCDgLw045022 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 24 Mar 2010 14:13:43 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.4/8.14.4/Submit) id o2OCDggA045019; Wed, 24 Mar 2010 14:13:42 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Matthias Apitz References: <20100323122927.GA4059@current.Sisis.de> Date: Wed, 24 Mar 2010 14:13:42 +0200 In-Reply-To: <20100323122927.GA4059@current.Sisis.de> (Matthias Apitz's message of "Tue, 23 Mar 2010 13:29:27 +0100") Message-ID: <87mxxxudc9.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: sendmail && UTF-8 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2010 12:14:02 -0000 On Tue, 23 Mar 2010 13:29:27 +0100, Matthias Apitz wrote: > Hello, > > I want to sendout mail the following way: > > sendmail -t < filename > > where the file 'filename' contains some header lines, especially To: > Subject: and From: and as well the body of the mail; all is in UTF-8 > and I know I have to encode the header lines and says something about > the body. With Perl it goes like this: > > #!/usr/bin/perl > > use utf8; > use Encode; Since you are using perl, it may be more useful to start from something like mail/p5-MIME-Lite instead of rolling your own.