Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

217
Views
Send HTML Content to email client (Gmail) using ShareCompat.IntentBuilder

I am trying to send an email which is HTML formatted. I have been trying with the following code with no luck

    val body = "<!DOCTYPE html><html><body><a href=\"http://www.w3schools.com\" target=\"_blank\">Visit W3Schools.com!</a></body></html>"

    ShareCompat.IntentBuilder.from(this)
            //.setType("message/rfc822")
            .setType("text/html")
            .setSubject("test")
            .setHtmlText(body) 
            .setChooserTitle("Send Email")
            .startChooser()

Its just not working...coming as plain text.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!