0

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.

olti
  • 91
  • 1
  • 10
  • This question satisfies the "about software tools primarily used by programmers" requirement, so ***it is on-topic*** for stackoverflow and should ***not*** be closed. – Mike Nakis Dec 22 '22 at 08:00
  • My guess would be that you would achieve this by specifying an additional header. So, curl must be offering some means of specifying additional headers, and there must be some header that accomplishes it. – Mike Nakis Dec 22 '22 at 08:01

1 Answers1

0

Your error.txt can include something like this :

From: "User Name" <username@gmail.com>
To: "John Smith" <john@example.com>
X-Priority: 1
Subject: This is a test

Hi John,
I’m sending this mail with curl.
SelVazi
  • 10,028
  • 2
  • 13
  • 29
  • 1
    nice it worked.Before i tried to put X-Priority: 1 as flag in curl command and not within error.txt – olti Dec 23 '22 at 10:20