Regarding MAILX [message #233060] |
Tue, 24 April 2007 08:54 |
shahnazurs
Messages: 240 Registered: June 2005 Location: India
|
Senior Member |
|
|
Hi,
~< ! uuencode /etc/passwd passwords
I have just used this command, could you please explain how this is working?
Shahnaz.
|
|
|
|
|
|
Re: Regarding MAILX [message #233453 is a reply to message #233191] |
Thu, 26 April 2007 03:19 |
shahnazurs
Messages: 240 Registered: June 2005 Location: India
|
Senior Member |
|
|
Thanks,
/usr/bin/mailx -s "${SUBJECT}" ${TO} <<-EOF
in the above command why we need to use -EOF instead of EOF?
because here document definition is
<<anything
...
...
anything
Shahnaz.
|
|
|
|
Re: Regarding MAILX [message #235780 is a reply to message #233568] |
Tue, 08 May 2007 00:32 |
shahnazurs
Messages: 240 Registered: June 2005 Location: India
|
Senior Member |
|
|
Thanks Andrew.
i just tried couple of scenarios
1>>>
$mailx -s "HI" xyz@gmail.com<<-EOF
>hi
><tab>how are you?
>EOF
o/p
hi
how are you?
2>>>
$mailx -s "HI" xyz@gmail.com<<EOF
>hi
><tab>how are you?
>EOF
o/p
hi
<tab>how are you?
Do we have in mailx command, any option to send cc (corbon copy)??
Thanks.
|
|
|
Re: Regarding MAILX [message #235799 is a reply to message #235780] |
Tue, 08 May 2007 01:10 |
tahpush
Messages: 961 Registered: August 2006 Location: Stockholm/Sweden
|
Senior Member |
|
|
Quote: | 1. Mail No attachment, body only -
mailx -m -s "Some Subject" somone@somewhere.com < file_for_email_body
2. Mail with attachement, no body -
ux2dos /path_to/some_file | uuencode some_file.txt | mailx -m -s "MAIL FROM Someone" someone@somewhere.com
3. Mail with attachment and body -
ux2dos /path_to/some_file | uuencode some_file.txt | mailx -m -s "MAIL FROM Someone" someone@somewhere.com < file_for_email_body
4. Mail with carbon and blind carbon -
mailx -m -s "Some Subject" somone@somewhere.com < file_for_email_body
(Note that this does not work with the -r option as it disables ~ commands.)
(The file_for_email_body should look like this - )
~c someone_to_cc@somewhere.com
~b someone_to_bc@somewhere.com
The remainder of this file can be the text body of the email.
5. Mail with multiple attachments and body (Leave out the 'This is all you get' if body not desired) -
mailx -m -s "Hello" someone@somewhere.com << END
`ux2dos /home/dlamar/.kshrc | uuencode /home/dlamar/.kshrc.txt`
`ux2dos /home/dlamar/.profile | uuencode /home/dlamar/.profile.txt`
This is all you get.
END
|
Source
|
|
|