jay8142
asked on
Using sendmail at the command line
What is the commandline format to send a text file using sendmail? In linux, I want to send a file named test.txt to jcj@tiac.net. If I use "sendmail -v jcj@tiac.net", I can then enter the message and it reaches the end person. How can I send the premade file. I've done this in the past but have forgotten the command line syntax. Thank you
jcj@tiac.net
jcj@tiac.net
sendmail -v jcj@tiac.net < test.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
How about:
mail -f myfile.txt
then follow prompts:
Subject, recipient, etc.
"Ctrl-D" to end message.
mail -f myfile.txt
then follow prompts:
Subject, recipient, etc.
"Ctrl-D" to end message.
rkuethe, i'm afraid mail -f myfile.txt
is to extract mail from an alternate mailbox called myfile.txt
is to extract mail from an alternate mailbox called myfile.txt
Try this from the UNIX command line:
( cat /tmp/a ; uuencode /tmp/a file.txt ) | sendmail rallen@devifx1
( cat /tmp/a ; uuencode /tmp/a file.txt ) | sendmail rallen@devifx1