Starting March 27, 2025, we recommend using android-latest-release instead of aosp-main to build and contribute to AOSP. For more information, see Changes to AOSP.
         
       
     
  
  
  
  
  
    
    
      
    
    
      
      Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
  
  
    
    
  
  
IEmail.Message
  public
  static
  
  
  class
  IEmail.Message
  
    extends Object
  
  
  
  
  
  
  
    
    | java.lang.Object | 
  
  
    
      | ↳ | com.android.tradefed.util.IEmail.Message | 
  
  
    
  Container for email message data.
Summary
| Public constructors | 
|---|
  
  
  
    | 
      Message()
       | 
  
  
  
  
    | 
      Message(String to, String subject, String body)
      Convenience constructor: create a simple message
        
    
 | 
  
Public constructors
    Message
    
public Message ()
    
    
    
  
 
    Message
    
public Message (String to, 
                String subject, 
                String body)
    
    
    
  Convenience constructor: create a simple message
    
    | Parameters | 
|---|
      
        | to | String: Single destination address | 
      
        | subject | String: Subject | 
      
        | body | String: Message body | 
    
 
Public methods
    addBcc
    
public void addBcc (String address)
    
    
    
  
    
    | Parameters | 
|---|
      
        | address | String | 
    
 
    addCc
    
public void addCc (String address)
    
    
    
  
    
    | Parameters | 
|---|
      
        | address | String | 
    
 
    addTo
    
public void addTo (String address)
    
    
    
  
    
    | Parameters | 
|---|
      
        | address | String | 
    
 
    getBody
    
public String getBody ()
    
    
    
  
    
 
    getContentType
    
public String getContentType ()
    
    
    
  
    
 
    getSender
    
public String getSender ()
    
    
    
  
    
 
    getSubject
    
public String getSubject ()
    
    
    
  
    
 
    isHtml
    
public boolean isHtml ()
    
    
    
  
    
 
    setBody
    
public void setBody (String body)
    
    
    
  
    
 
    setContentType
    
public void setContentType (String contentType)
    
    
    
  
    
    | Parameters | 
|---|
      
        | contentType | String | 
    
 
    setHtml
    
public void setHtml (boolean html)
    
    
    
  
    
 
    setSender
    
public void setSender (String sender)
    
    
    
  
    
 
    setSubject
    
public void setSubject (String subject)
    
    
    
  
    
    | Parameters | 
|---|
      
        | subject | String | 
    
 
    setTos
    
public void setTos (String[] recipients)
    
    
    
  Set the recipients. All previously added recipients will be replaced.
 addTo(String) to append to the recipients list.
    
    | Parameters | 
|---|
      
        | recipients | String: an array of recipient email addresses | 
    
 
 
 
  
  
 
  
    
    
      
    
    
  
       
    
    
  
  
  Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
  Last updated 2023-03-08 UTC.
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-03-08 UTC."],[],[]]