Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Add formatting to the body of a javascript-generated email using mailto (or better idea?)

Participant ,
Apr 05, 2023 Apr 05, 2023

Hey all,

 

I'm using this simple code below to generate an email at the click of a button. If there is a different method, please let me know. I'd really like to add even minimal formatting to the email. Wishlist: some underline, hyperlink, indent. But even attempts to indent have failed: I've tried "    ", "\t", "\u0009".

Any suggestions?

var templateText = "Template text here.\n\nThank you,"

 

// Create the email message
var email = "mailto:recipient@example.com?subject=Onboarding&body=" + encodeURIComponent(templateText);
 
// Open Microsoft Outlook and create a new email message
app.launchURL(email);
TOPICS
JavaScript , PDF forms
702
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 05, 2023 Apr 05, 2023
LATEST

Acrobat JavaScript sends plain-text emails. Formatting of plain text (including setting a font, text style, tabs, or almost anything else) is impossible. In some mail clients, leading blanks might make an indent; others will ignore it. This cannot be added to a wish list, because it's impossible in plain text, an eternal and unchanging email standard.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines