Sending two text files with mail command - No -a support [duplicate]
This question already has an answer here:
Trying to send multiple text attachments via mail message
1 answer
I searched but did not find this answer. I am running an old RedHat 5.3 system on one server (working on upgrade to 7 in progress) but I want to send 2 text files using the mail command. I do this all the time with a single file like this:
mail username -s 'MySubject' < /home/directory/file1.txt
I tried this:
mail username -s 'MySubject' < /home/directory/file1.txt < /home/directory/file2.txt
But that send the output of the first part including the results of the mail command along with both text files.
Is there a better way to do this?
linux mail-command
marked as duplicate by Jeff Schaller, Thomas, msp9011, Archemar, Kusalananda
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 21 at 13:30
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Trying to send multiple text attachments via mail message
1 answer
I searched but did not find this answer. I am running an old RedHat 5.3 system on one server (working on upgrade to 7 in progress) but I want to send 2 text files using the mail command. I do this all the time with a single file like this:
mail username -s 'MySubject' < /home/directory/file1.txt
I tried this:
mail username -s 'MySubject' < /home/directory/file1.txt < /home/directory/file2.txt
But that send the output of the first part including the results of the mail command along with both text files.
Is there a better way to do this?
linux mail-command
marked as duplicate by Jeff Schaller, Thomas, msp9011, Archemar, Kusalananda
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 21 at 13:30
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Trying to send multiple text attachments via mail message
1 answer
I searched but did not find this answer. I am running an old RedHat 5.3 system on one server (working on upgrade to 7 in progress) but I want to send 2 text files using the mail command. I do this all the time with a single file like this:
mail username -s 'MySubject' < /home/directory/file1.txt
I tried this:
mail username -s 'MySubject' < /home/directory/file1.txt < /home/directory/file2.txt
But that send the output of the first part including the results of the mail command along with both text files.
Is there a better way to do this?
linux mail-command
This question already has an answer here:
Trying to send multiple text attachments via mail message
1 answer
I searched but did not find this answer. I am running an old RedHat 5.3 system on one server (working on upgrade to 7 in progress) but I want to send 2 text files using the mail command. I do this all the time with a single file like this:
mail username -s 'MySubject' < /home/directory/file1.txt
I tried this:
mail username -s 'MySubject' < /home/directory/file1.txt < /home/directory/file2.txt
But that send the output of the first part including the results of the mail command along with both text files.
Is there a better way to do this?
This question already has an answer here:
Trying to send multiple text attachments via mail message
1 answer
linux mail-command
linux mail-command
edited Jan 20 at 2:27
user1794469
1,5841822
1,5841822
asked Jan 20 at 2:13
Scott PatersonScott Paterson
31
31
marked as duplicate by Jeff Schaller, Thomas, msp9011, Archemar, Kusalananda
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 21 at 13:30
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Jeff Schaller, Thomas, msp9011, Archemar, Kusalananda
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 21 at 13:30
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You'll need to concatenate the two files into a single unit before piping them to the mail
command. Like this, for example:
cat /home/directory/file1.txt /home/directory/file2.txt | mail username -s 'MySubject'
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You'll need to concatenate the two files into a single unit before piping them to the mail
command. Like this, for example:
cat /home/directory/file1.txt /home/directory/file2.txt | mail username -s 'MySubject'
add a comment |
You'll need to concatenate the two files into a single unit before piping them to the mail
command. Like this, for example:
cat /home/directory/file1.txt /home/directory/file2.txt | mail username -s 'MySubject'
add a comment |
You'll need to concatenate the two files into a single unit before piping them to the mail
command. Like this, for example:
cat /home/directory/file1.txt /home/directory/file2.txt | mail username -s 'MySubject'
You'll need to concatenate the two files into a single unit before piping them to the mail
command. Like this, for example:
cat /home/directory/file1.txt /home/directory/file2.txt | mail username -s 'MySubject'
answered Jan 21 at 9:20
telcoMtelcoM
16.5k12345
16.5k12345
add a comment |
add a comment |