How can I send mail from the console marked with "priority high" flag?
Currently I'm using this syntax:
echo "message content" | mail -s "subject" [email protected]
I don't see any switches for this in man
.
How can I send mail from the console marked with "priority high" flag?
Currently I'm using this syntax:
echo "message content" | mail -s "subject" [email protected]
I don't see any switches for this in man
.
Can you use sendmail
? If so:
mymachine $ sendmail [email protected] <<EOM
> To: [email protected]
> From: [email protected]
> Subject: Test mail `date +"%x %H:%M"`
> Importance: high
> X-Priority: 1 (Highest)
> X-MSMail-Priority: High
>
> Test message
> EOM
mymachine $
The text after >
would be typed in on the newline. Of course, you could just pipe a text file:
mymachine $ cat > message
> To: [email protected]
> From: [email protected]
> Subject: Test mail `date +"%x %H:%M"`
> Importance: high
> X-Priority: 1 (Highest)
> X-MSMail-Priority: High
>
> Test message
## CTRL+D ##
mymachine $ cat message | sendmail [email protected]
man write
made your day.