Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importance flag 4

Status
Not open for further replies.

iceman4000000

Programmer
Jun 7, 2001
30
GB
Hi everyone,

is there a way to send mail in unix and flag it as high importance? I haven't seen anything in the man pages for mail, mailx or sendmail....

Any ideas?

ICE
 
Do you mean the importance as it goes through the server? Or the flag for the end user to show it up as an important email?

The first I don't think is possible, the second is an X-Priority: header. Hope that gives you an idea.
--
Jon
 
Hi, thanks for the reply...

The one I'm after is showing it on the end user's computer as important mail...

What is an X-Priority header?

Thanks,

ICE
 
The MUA not the MTA should be setting any X-Priority headers ...

Pine, Mutt, evolution, Outlook Depress and etc are MUAs that set many different X-Headers, just look at the full source of an email message in your /var/mail/<username> file

Now, not all MUAs support flagging messages as High Priority, nor do they all support doing anything about msgs that are set as such... the X-Headers are &quot;eXtra Headers&quot; if you will...

If you let us know the MUAs in question, we may be able to help you get the functionality that you need :)

-d3vNull
 
I would like to use sendmail and set the importance of the message to &quot;High&quot;. Could you pls supply an example of how this can be achieved.
 
Like d3vNull was saying, Sendmail doesn't do this, its the MUA that does it. For example, if you are using Outlook to send a piece of mail, just click the &quot;red exclamation point&quot; icon to mark the email as high importance. Every MUA (or client side program) has a different way of doing it.

ChrisP ------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says &quot;Mark this post as a helpful/expert post&quot;.
 
I am speaking of the reverse situation.

I am using sendmail not Outlook to send the email. This happens programatically not manually. My software generates a file including the sendmail command, the headers and the body of the message. The file is then executed in Unix to send the mail. I need that the message will be displayed at the receiving end (Outlook or other software) flagged with high importance. What is the syntax for the header to be included in my sendmail command in order to achieve that? Are you guys saying that the syntax for that header may be specific to the receiving software? ie Outlook? if that is the case, can you supply the syntax for that header? Is there a header fairly generic that could be understood by Outlook as well as other software?

Thanks and hope that I made myself understood this time.
 
[hourglass]This works for a simple html message (note importance can be High, Low, Normal). I've been trying to set the follow up flag in a similar manner with no luck. Does anybody know this secret?

sub mails()
my $to = $_[0];
my $subject = $_[1];
my $content = $_[2];
my $from = $_[3];
my $MAILPROGRAM = &quot;/usr/lib/sendmail&quot;;
open (SENDMAIL, &quot;| $MAILPROGRAM -f$from -t&quot;);
print SENDMAIL &quot;To: $to\n&quot;;
print SENDMAIL &quot;Subject: $subject\n&quot;;
print SENDMAIL &quot;Importance: High\n&quot;;
print SENDMAIL &quot;Content-type: text/html\n\n&quot;;
print SENDMAIL $content;
close SENDMAIL;
}
 
Mrwinusa,
Thanks for that, you've got a star. It worked and it also worked for a text message ie when you don't set the Content-type as html. I'm glad someone eventually understood our question.

As first stated by Iceman, I had the same problem as I could not find the syntax for these headers/keywords in the Unix man pages.

Could someone explain in lay terms as for a 5 year old if there is any doco of the syntax for most usual headers, it would be useful if that were posted to the FAQ.
Thanks to all
 
No/incomplete/incorrect documentation has also been my problem. I had to send messages to myself and try to see what Outlook was sending - and then try to duplicate it with sendmail. I still have not figured out the follow-up flag. I'd like to set it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top