I am writing the code to send an email to our support group whenever the value goes more than the threshold level defined in the custom setting. I want to make the mail as more important. Please suggest me which can attract more to look into mail.

//Sending Email

 Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

enter image description here


Using Messaging.SingleEmailMessage, you can use emailPriority method to set it.

Messaging.SingleEmailMessage mail = 
    new Messaging.SingleEmailMessage(); 
// Set other values of mail
Mail.emailPriority = 'Highest';

Added: AFAIK, This method is still not mentioned in documentation yet.

Values accepted in emailPriority are:

  1. Highest
  2. Normal
  3. Lowest
| improve this answer | |
  • Unfortunately its still not mentioned in documentation though. – Raul Mar 24 '17 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.