How to use two subsequent ASCII encoded characters in html links? - html

I want my e-mail link to set the e-mail subject to :
Some text & some other text
my tag is
mailto
and it sets the Subject only to
Some text
How do I correctly write the %20%26%20 (" & ") part?
Thanks

mailto:somemail#example.com?subject=some%20text%20%26%20some%20other%20text
I created an open-source tool for making this easy. Enter the strings you want and you'll instantly get the mailto:
mailto.now.sh
💌⚡️ Template full emails in a mailto

Related

force email client to display html address as text and not as link

My web application sends emails to subscribed users.
The email is formatted as an html page and contains html addresses specified as plain text (not inside href tag).
The intent is for the email client to display the html address as simple text, one that the user can "paint" with the cursor and copy to clipboard
This works just fine in some email clients (for example yahoo). However,
other clients (for example, MS outlook and gmail) detect these pieces of text, and display the html address as a link, making it difficult for the user to do the paint-copy-paste described above.
I tried the following:
wrap the text in CDATA block - gmail then disregards the whole block
escape the html address (instead of http://... --> http://...) - makes no difference (still make a link out of text)
any ideas?
you could but a double :: to disable the parsing:
http:<span style="display: none;">:</span>//google.com/
This will not show the second : and should avoid the parsing.
EDIT:
This will work:
http<span>:</span>//google<span>.</span>com/

Set a mailto link with a subject containing an ampersand (&)

Im using the following mailto link to send an email:
<a class="share3" title="" href="mailto:?subject=#check&body=#domain">
It works well, but sometimes my subject will contain an ampersand (&) character, and when it does my email is created without a body.
Any way to resolve this problem?
In order to get special/reserved characters into a URL, you must encode them - to get an & to work, it must be encoded to %26.
More details here: http://www.w3schools.com/tags/ref_urlencode.asp
use %26 for the & in the subject.

Issue with ampersand in Input element

I have a form element on my ASP page, and under the <input> element there is a "value" attribute, in which I have an email recipient.
However, the email address has an ampersand (&) in it, and I'm not sure how to encode it for a HTML attribute...any help would be appreciated.
I currently have this format, but I am not receiving the emails:
<input type="hidden" name="recipient*" value="data&info#example.com">
Should I be using %26 to encode it, or is & correct? Or am I just doing it wrong?
Thanks for the help!
In HTML you should use &
%26 is used for URL encoding, when there's an ampersant in a parameter of the page, for example.
& should work fine, can you send/receive an email to that address manually?

Email formatting basics (links in plain text emails)

Sending an email from a server isn't quite as easy as sending it from a client.
I know I can choose to send plain text or html, but I want to keep things as simple as possible.
I have a link in the email that the user should click to reset their password.
When I send the whole link, and check my gmail, it becomes a hyperlink automatically.
My guess is that this isn't the case in all email clients.
What are my options for sending a link in plain text format?
Is the only way to be sure to have a clickable link to use html?
If I use html, what is the minimum markup I must have?
If you send your email in plain text, then your URL will be plain text. It's plain text, you can't dress it up.
If you send it as HTML, just use a simple anchor tag and use the URL as both the href and the text. That way if a mail client removes the link at least the user will still be able to copy/paste the url.
Another option rather than simply including urls inline in your text is to use a markdown-ish syntax that allows you to separate the two. For example, using citation-style link references (a la the way SO does it in this editor) could be done like so:
Hello, this is a plain email that links to a [cool page][1].
Sincerely,
Joe
[1]: http://foo.com/cool_page
I've seen it done this way and it works well, especially if you have a lot of links.
There is a syntax similar to angle-addr as defined in RFC2822 and mailto URL Schema defined in RFC2368.
RFC2396 mentions using angle brackets as delimiters around URI in text documents and protocol fields:
The angle-bracket "<" and ">" and double-quote (") characters are
excluded because they are often used as the delimiters around URI in
text documents and protocol fields. The character "#" is excluded
because it is used to delimit a URI from a fragment identifier in URI
references (Section 4). The percent character "%" is excluded because
it is used for the encoding of escaped characters.
delims = "<" | ">" | "#" | "%" | <">
Example derived from real-world usage:
From: alpha#beta.com
To: theta#omega.com
Content-Type: text/plain
Some introduction text
The text I want to display in this link<https://some.target.dom/ain#place?i=want&to=go>
The rest of my plain text message
To send html emails you have to provide full structured html page with no relative links (only full urls) for any resources(images src, styles and href link attributes).
But text emails are good enough for their purposes, in web mail clients links are found in mails text by browser, and standalone mail clients do this work by themselves.

How to send mail with a Subject using a Mailto URL?

I need to make a Mailto link to my website which is suppose to contain either the product name or the product page URL in the subject section. How can I do it?
Exp: When you get an email through eBay about a product you are selling or buying, you automatically know what product that email is about by seeing the product name in the subject section.
How can i do this?
Email Me!
Internet Archive:
Set up an HTML mailto form without a back-end script
HTML Mailto Attribute and Tips
HTML Mailto Tips and Tricks
Mailto Syntax
Related Stackoverflow Questions:
Avoiding the Mailto Annoyance?
Best way to obfuscate an e-mail address on a website?
Effective method to hide email from spam bots
What are some ways to protect emails on websites from spambots?
I've run into problems with this before when I didn't url encode the value, so I would suggest (using lc's example):
<a href="mailto:foo#bar.com?subject=This+Is+My+Product">
or
<a href="mailto:foo#bar.com?subject=This%20Is%20My%20Product">
This page [Link Dead] outlines the syntax of mailto URIs:
Address message to multiple recipients
, (comma separating e-mail addresses)
Add entry in the "Subject" field
subject=Subject Field Text
Add entry in the "Copy To" or "CC" field
cc=id#internet.node
Add entry in the "Blind Copy To" or "BCC" field
bcc=id#internet.node
Add entry in the "Body" field
body=Your message here
Within the body use "%0A" for a new line,
use "%0A%0A" for a new line preceded by a blank line (paragraph),
What you are looking for is:
<a href="mailto:foo#bar.com?subject=This Is My Product">
Note, it's probably a good idea to URL encode the spaces with either a + or a %20:
<a href="mailto:foo#bar.com?subject=This+Is+My+Product">
Try This
If you want something more advanced, you're going to have to code it from scratch (or use someone else's script). Try looking into PHP, ASP.NET, Ruby on Rails, etc.
Try this code to set subject, body, cc, bcc
<p>HI venky!</p>