Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javascript 'mailto' command

What is used to bold the text in a 'mailto' javascript? After some research i found that %0A is used to insert a new line.

This is my javascript:

location.href="mailto:" +
   "?subject=" + "Sub:{!Trigger_Event__c.Title__c}" + 
   "&body="+ "Title:{!Trigger_Event__c.Title__c}"+"%0AOrganization:" + "{!Trigger_Event__c.Account__c}";

I need to bold the 'Headline' in the script.

Kindly provide your inputs..

Thanks in advance.

like image 883
user629975 Avatar asked Feb 06 '26 08:02

user629975


1 Answers

I assume that you want to make the "Title" text in the message body bold. Something like this: ..."&body="+ "Title:<BOLD>{!Trigger_Event__c.Title__c}</BOLD>"+"%0A... Is that what you mean?

This is not possible. The mailto protocol is very limited. The official definition is in RFC 6068. It's all just plain text. There is no way to specify that the body is some kind of Rich Text or HTML, and even if there were, you cannot rely on it that most browsers and mail clients and web mail systems would support it.

like image 105
gpvos Avatar answered Feb 07 '26 22:02

gpvos