title: How to set the text color to my MIME message.setSubject() methods text content?
body: <p>I have written a java code to send a mail.</p>
  
  <p>I need to set the Email subject color,ie I need to set the color for the text of method message.setSubject().  </p>
  
  <p>Below are my codes :</p>
  
  <pre><code>package comparexmlf1;
  import comparexmlf1.validatexml;
  import comparexmlf1.CarParser1;
  import comparexmlf1.OrderParser2;
  import java.io.BufferedReader;
  import java.io.FileInputStream;
  import java.io.IOException;
  import java.io.InputStreamReader;
  import java.io.ObjectInputStream.GetField;
  import java.text.DateFormat;
  import java.text.SimpleDateFormat;
  import java.util.Calendar;
  import java.util.Enumeration;
  import java.util.Properties;
  import java.util.logging.Logger;
  import javax.lang.model.element.Element;
  import javax.mail.Message;
  import javax.mail.MessagingException;
  import javax.mail.Multipart;
  import javax.mail.Session;
  import javax.mail.Transport;
  import javax.mail.internet.AddressException;
  import javax.mail.internet.InternetAddress;
  import javax.mail.internet.MimeBodyPart;
  import javax.mail.internet.MimeMessage;
  import javax.mail.internet.MimeMultipart;
  import javax.swing.text.html.MinimalHTMLWriter;
  import javax.xml.soap.MimeHeader;
  import org.apache.log4j.Appender;
  import org.apache.log4j.FileAppender;
  
  public class mailer {
  static void sendmail() throws IOException,   
  MessagingException,AddressException
     {
            String to1=CarParser1.to1;
            DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy 
  HH:mm:ss");
            Calendar cal = Calendar.getInstance();
              String to2 = CarParser1.to2;
              String to3= CarParser1.to3;
              String to4=CarParser1.to4;
              String from = CarParser1.from;
              String host = CarParser1.host;
              Properties properties = System.getProperties();
              properties.setProperty("mail.smtp.host", host);
              Session session = Session.getDefaultInstance(properties);
              MimeMessage message = new MimeMessage(session); 
              int m_toterr,m_totwarn;
              String getfilepath="";
              String filenamechange="D:/newlog
  /"+CarParser1.si_orderid+"_log.txt";
              System.out.println("New File Path for mail:"+filenamechange);
              String pathLogFile = filenamechange;
              Enumeration enumeration = 
  CarParser1.logger.getRootLogger().getAllAppenders();
              try {
                  m_toterr=validatexml.Total_err;
                  message.setFrom(new InternetAddress(from));   
                  message.addRecipient(Message.RecipientType.TO, new 
  InternetAddress(to1));                  
                  message.setSubject("&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;h1&gt;&lt;p 
  style=color:red&gt; CAR Validation Report at : 
  "+dateFormat.format(cal.getTime())+" for the Order ID : 
  "+CarParser1.si_orderid+"&lt;/p&gt;&lt;/h1&gt;&lt;/body&gt;&lt;html&gt;","text/html" 
  );                  
                      StringBuffer sb = new StringBuffer();
                      FileInputStream fstream = new 
  FileInputStream(pathLogFile);
                      BufferedReader br = new BufferedReader(new 
  InputStreamReader(fstream));
  
                      String singleLine;
                      while ((singleLine = br.readLine()) != null) 
                      {
  
                          sb.append(singleLine + "&lt;br&gt;");
  
                      }
                      br.close();
                      String allLines = sb.toString();
                      String allLines_html=" &lt;html&gt;&lt;head&gt;&lt;title&gt;&lt;/title&gt;   
  &lt;/head&gt;"
                              + "&lt;body style=background-
  color:skyblue;&gt;"+allLines+"&lt;/body &gt;&lt;/html&gt;";
                    message.setContent(allLines_html, "text/html; 
  charset=ISO-8859-1");
                   Transport.send(message);
  
  
  
                  System.out.println("Email Sent successfully....");
                  CarParser1.logger.info("Email Sent Successfully...");
                  System.out.println();
  
              } 
              catch (MessagingException mex) 
              {
                  System.out.println("Invalid Email Address.please provide 
  a valid email id to send with");
                  mex.printStackTrace();
  
  
              }
  
  
  
     }
    }
  </code></pre>
  
  <p>Can anyone help me to achieve this task.</p>
  
  <p>Thank you</p>