Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make text in an email bold with URL encoding

I am using a mailto link with URL encoding to populate an email, and I want to make some of the text in the email body bold. I have tried using HTML tags and asterisks already, and googling didn't turn up anything helpful. Is it possible?

I am writing a chrome extension that needs to work with Outlook specifically.

Here's an example of my encoding:

"mailto:[email protected]?Subject=Hello&Body=This%20should%20be%20bold!"

Thanks for any help!

like image 424
Julie Avatar asked Jan 09 '14 01:01

Julie


People also ask

How do I encode a URL in text?

Since URLs often contain characters outside the ASCII set, the URL has to be converted into a valid ASCII format. URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits. URLs cannot contain spaces. URL encoding normally replaces a space with a plus (+) sign or with %20.

How do you make something bold in HTML?

The HTML <b> element defines bold text, without any extra importance.

What is the best way to URL encode a string?

URLEncoder is the way to go. You only need to keep in mind to encode only the individual query string parameter name and/or value, not the entire URL, for sure not the query string parameter separator character & nor the parameter name-value separator character = .


1 Answers

No. This is not possible at all.

As you can see in RFC 2368, this is not possible at all:

The special hname "body" indicates that the associated hvalue is the body of the message. The "body" hname should contain the content for the first text/plain body part of the message. The mailto URL is primarily intended for generation of short text messages that are actually the content of automatic processing (such as "subscribe" messages for mailing lists), not general MIME bodies.

Credit to the top two answers (Quentin and Alfonso Marin) on the linked duplicate answer.

like image 197
user764357 Avatar answered Sep 21 '22 14:09

user764357