Re: Linux email

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 11 February 2004 04:19 am, Jason Dale wrote:
> Hi,
>
> This is not really a Linux OS question per se, but it involves
> just sending mail from the command line on a Linux system.
>
> I use the following two methods:
>
> /bin/cat messagebody.txt | /usr/sbin/sendmail -f myself@xxxxxxxxxx -O
> NoRecipientAction=add-to
> recipient@xxxxxxxxxx

[...]

> The problem is that with the sendmail option, I can change the 'from:'
> address
> but I can't change the subject line. With the 'mail' command, I can
> change the subject line but I can't change the darn 'From:' address.
> Does anyone know of a SIMPLE way that I can do both?

Using sendmail, you can put the subject in the text  file.

/usr/sbin/sendmail -f nosuchuser@xxxxxxxxxxxxxxxx -O 
NoRecipientAction=add-to validuser@xxxxxxxxxxxx < mail.txt

Where mail.txt contains:

Subject: Test message

This is a test, this is only a test.
Had this been an actual message, it
would have contained useful data.

The result the recipient sees:

Test message
Date: Wed, 11 Feb 2004 06:34:45 -0500
From: nosuchuser@xxxxxxxxxxxxxxxx
To: [..snip...]

This is a test, this is only a test.
Had this been an actual message, it 
would have contained useful data.

- -- 
- -Michael

pgp key:  http://www.tuxfan.homeip.net:8080/gpgkey.txt
Red Hat Linux 7.{2,3}|8.0|9 in 8M of RAM: http://www.rule-project.org/en/
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQFAKheGn/07WoAb/SsRAhCMAJ41poej6AWSQatq5pzsxXrQUcxlswCbBOKg
WZ/jOJumubBGq7H7z4fCdms=
=YeFH
-----END PGP SIGNATURE-----


-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux