Advanced Email Link Generator (with Anti-Spam Encoder)
This link generator, written entirely with HTML and JavaScript, can create sophisticated mailto: links for you. You just fill in the form and click the button.
mailto: links, for those who are unfamiliar with them, are similar to http: links except they open up a new email message page in your visitor's email program instead of a new web page in their browser.
The usual mailto: link fills in the "To:" address of the email's header. This Advanced Email Link Generator allows you to generate links that may also fill in:
-
The "CC:" address in the email's header.
-
The "BCC:" address in the email's header.
-
The "Subject:" line of the email.
-
The body text of the email.
The "To:", "CC:", and "BCC:" fields can each have multiple email addresses separated with a comma.
For Subject: and email body text, do not use any "?", "&", or "=" characters. Those characters tend to confuse some email programs, discarding all text beginning at the first occurrence -- even when those characters are encoded with hex values.
Not all email programs will pre-fill in each of the above fields. Most will.
Some email programs will not pre-fill in the email's body text even if it might accept the others listed above. Also, some email programs that will pre-fill in body text will nevertheless refuse to insert line breaks that you might specify. Thus, it may be prudent to keep body text in one paragraph.
The drawback to using this type of advanced email link is that not you don't know ahead of time what your visitor's email program capabilities are. Even so, it doesn't hurt to specify the advanced fields you desire; the email programs that won't pre-fill just won't.
So go ahead and make your preferred email link (demo page URL is below). The only required form item is "To:"
The Advanced Email Link Generator generates both
-
an HTML link for web pages and HTML emails. It can be a text link or the generator will insert a placeholder for an image, and
-
a link for plain text emails.
The generated links can be copied and pasted into your emails and web pages.
Anti-Spam Encoder:
The Anti-Spam Encoder uses the ISO-Latin-1 codeset to encode the generated URLs for hiding your email address(s) from most, if not all, spammer's email harvesting robots. Even text links containing email addresses can be encoded to cloak them from harvesting robots, yet be visible and readable for your site visitors.
To employ the Anti-Spam Encoder simply check the box on the form.
Demo Page:
The demo page is here;
you can use the form on-line.
Or, you may prefer to save the page to your hard drive for off-line use. Once saved to your hard drive, simply double-click on the file name, or drag the saved file into your browser window or browser's icon.
Question:
Did you find this article interesting and understandable? How can it be improved?
Your response is anonymous.
When done typing, click anywhere outside the box. [more info]
Will Bontrager
©2000 Bontrager Connection, LLC
Please note:
Articles on this website are presented "as is". However -
If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript
Ask one of our Experts and you'll have your answer!
Click here for details.