Operating System - HP-UX
1834112 Members
2393 Online
110063 Solutions
New Discussion

mailx command - Disregarding the Header information

 
SOLVED
Go to solution
Josh_127
New Member

mailx command - Disregarding the Header information

Hi all,

I am trying to send an e-mail attachment using mailx command with the - N option, but still get all the header information enclosed in the body of the message, can anybody suggest on how to get rid of the headers like "Received", "Date", "From", "To", "Subject", "message-id", "MIME", "Contect-type", etc.
in my example below:

e-mail command used:

mailx - N - s "Subject" xxx@yahoo.com

message text with the following header information appended:

Received: from xyz.mailserver.com (xyz.mailserver.com) by xyz.mailserver.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id WL73WCWC; Tue, 8 Nov 2005 10:54:58 -0500
Received: from Unknown [ip address] by xyz.mailserver.com - SurfControl E-mail Filter (5.0); Tue, 08 Nov 2005 10:54:57 -0500
Received: from xyz.mailserver.com (root@mailserver.com [ip address2])
by xyz.mailserver.com (8.9.3 (PHNE_26305+JAGae58098)/8.9.3) with ESMTP id KAA14436
for ; Tue, 8 Nov 2005 10:51:12 -0500 (EST)
Date: Tue, 8 Nov 2005 10:51:12 -0500 (EST)
From:
Message-Id: <200511081551.KAA04195@xyz.mailserver.com>
To: xyz@yahoo.com
Subject: SUBJECT
Mime-Version: 1.0
Content-Type: text/plain; charset=X-roman8
Content-Transfer-Encoding: 7bit
3 REPLIES 3
Steven E. Protter
Exalted Contributor
Solution

Re: mailx command - Disregarding the Header information

Its not an email without header info.

What exactly are you trying to accomplish?

Here is a working sendmail based attachment script:

http://www.hpux.ws/mailfile2

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Kofi ARTHIABAH
Honored Contributor

Re: mailx command - Disregarding the Header information

Josh:
The -N option for mailx applies when you are using it as a (MUA) reader - ie, it does not display the headers to you. If you dont want the headers to show (I wonder why) you may consider using nc/telnet to talk directly to the mailserver on port 25...although that might contravene rfc-822.
nothing wrong with me that a few lines of code cannot fix!
Dave La Mar
Honored Contributor

Re: mailx command - Disregarding the Header information

Josh -
This has been posted a number of times. Please see the attached file for common uses of mailx, many of which we use in our shop.

Best of luck.

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."