Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Php mail() - Priority types

Tags:

php

want to know what are the php mail() priority types. I read this question and I read the php manual,

<?php
    $headers = "MIME-Version: 1.0\n" ;
    $headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\n";
    $headers .= "X-Priority: 1 (Higuest)\n";
    $headers .= "X-MSMail-Priority: High\n";
    $headers .= "Importance: High\n";
    $status   = mail($to, $subject, $message,$headers);
?> 

but its not explain what are the types we can used. X-Priority: 1 (Higuest) and X-MSMail-Priority: High two different words used for this. there are few types of priority I found. ex: Low, Medium, High, Urgent, Emergency, Critical how we used this types.

like image 528
Nytram Avatar asked Mar 22 '13 10:03

Nytram


1 Answers

Values: 1 = High, 3 = Normal, 5 = Low

you need not enter both lines, use either X-MSMail-Priority or X-Priority

Alternative to X-Priority, although X-Priority is preferred. "High" corresponds to X-Priority: 1, "Normal" is the same as X-Priority: 3, and "Low" is the same as "X-Priority: 5". Including both X-Priority and X-MSMailPriority in the same email header is OK, although it probably best they agree.

Example:

either

X-MSMail-Priority: High

or

X-Priority: 1

and go through this link, you'll get to know about mail function more

http://www.velvetblues.com/web-development-blog/avoid-spam-filters-with-php-mail-emails/

like image 152
Deepanshu Goyal Avatar answered Oct 19 '22 00:10

Deepanshu Goyal