Tuesday, May 26, 2015

Set email priority in JAVA

Following code can be used to set priority in email server. This is tested and worked fine.JAVA mail API is used for the development.

// Setting the priority of an email is simply a matter of setting the X-Priority header field.
// Values of 1 through 5 are acceptable
// 1 = highest priority, 3 = normal, and 5 = lowest priority.

// Set the email's priority to high:
email.AddHeaderField("X-Priority","1");

No comments:

Post a Comment