How to attach a file while sending an email through shell script?Send email from a shell scriptCalling an...
Why is the SNP putting so much emphasis on currency plans?
Power LED from 3.3V Power Pin without Resistor
Field Length Validation for Desktop Application which has maximum 1000 characters
Pigeonhole Principle Problem
How did Captain America use this power?
Junior developer struggles: how to communicate with management?
Why do freehub and cassette have only one position that matches?
When do aircrafts become solarcrafts?
You look catfish vs You look like a catfish?
Hang 20lb projector screen on Hardieplank
Can a cyclic Amine form an Amide?
Did we get closer to another plane than we were supposed to, or was the pilot just protecting our delicate sensibilities?
CRT Oscilloscope - part of the plot is missing
Which skill should be used for secret doors or traps: Perception or Investigation?
Write to EXCEL from SQL DB using VBA script
Survey Confirmation - Emphasize the question or the answer?
What happened to Rhaegal?
Why are notes ordered like they are on a piano?
Accidentally deleted the "/usr/share" folder
My ID is expired, can I fly to the Bahamas with my passport
Is balancing necessary on a full-wheel change?
How do I tell my manager that his code review comment is wrong?
How did Arya manage to disguise herself?
Unidentified items in bicycle tube repair kit
How to attach a file while sending an email through shell script?
Send email from a shell scriptCalling an email script from another script using ssmtp on ubuntuSending most recently created file via EmailEmail using shell script using email address from external flat fileForwarding an email as an attachment with a bash shell script, or applescriptUnix--Send attachment, subject and body of the mail using mailxAdding date to file name when sending emailTrouble Sending file content in the mail body with mailxNot able to send mail to a Group email address using mutt in a shell scriptHow to send an email with a shell script?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I used the following code to send an email via shell script.
Code: mail -s "subject" toaddress@gmail.com <<< "Body of the mail"
It worked. But I want to attach a file while sending the mail. How to do it?
shell-script
add a comment |
I used the following code to send an email via shell script.
Code: mail -s "subject" toaddress@gmail.com <<< "Body of the mail"
It worked. But I want to attach a file while sending the mail. How to do it?
shell-script
add a comment |
I used the following code to send an email via shell script.
Code: mail -s "subject" toaddress@gmail.com <<< "Body of the mail"
It worked. But I want to attach a file while sending the mail. How to do it?
shell-script
I used the following code to send an email via shell script.
Code: mail -s "subject" toaddress@gmail.com <<< "Body of the mail"
It worked. But I want to attach a file while sending the mail. How to do it?
shell-script
shell-script
asked 27 mins ago
VeluVelu
6813
6813
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can make use of "mutt" if it's installed in your Linux machine.
$$ mutt -a "file_attachment"
Other options are the same as in the mail command.
New contributor
What is$$
?
– Scott
8 mins ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f516289%2fhow-to-attach-a-file-while-sending-an-email-through-shell-script%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can make use of "mutt" if it's installed in your Linux machine.
$$ mutt -a "file_attachment"
Other options are the same as in the mail command.
New contributor
What is$$
?
– Scott
8 mins ago
add a comment |
You can make use of "mutt" if it's installed in your Linux machine.
$$ mutt -a "file_attachment"
Other options are the same as in the mail command.
New contributor
What is$$
?
– Scott
8 mins ago
add a comment |
You can make use of "mutt" if it's installed in your Linux machine.
$$ mutt -a "file_attachment"
Other options are the same as in the mail command.
New contributor
You can make use of "mutt" if it's installed in your Linux machine.
$$ mutt -a "file_attachment"
Other options are the same as in the mail command.
New contributor
edited 8 mins ago
Scott
7,10752952
7,10752952
New contributor
answered 16 mins ago
ezio16ezio16
11
11
New contributor
New contributor
What is$$
?
– Scott
8 mins ago
add a comment |
What is$$
?
– Scott
8 mins ago
What is
$$
?– Scott
8 mins ago
What is
$$
?– Scott
8 mins ago
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f516289%2fhow-to-attach-a-file-while-sending-an-email-through-shell-script%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown