Sending email via curl in Linux

138 Views Asked by At

i am using command below for sending emails via curl in a linux docker container.

curl ${REPORT_SMTP_SERVER} --mail-from ${REPORT_MAIL_FROM} --mail-rcpt ${REPORT_MAIL_TO} --upload-file error.txt

This command works pretty well and emails are sent.I was wondering is there any way how to send those emails with high priority?Unfortunately did not find any flag for that in curl documentation.

1

There are 1 best solutions below

1
On BEST ANSWER

Your error.txt can include something like this :

From: "User Name" <[email protected]>
To: "John Smith" <[email protected]>
X-Priority: 1
Subject: This is a test

Hi John,
I’m sending this mail with curl.