How do I configure the "mailto" to include a subject line?
This is not exclusively Java-related, but...
- The <A> - A is an anchor tag.
- <A HREF="blah"> send me email</A>
- HREF is an attribute of the anchor tag that tells the browser to do something. Other attributes of the anchor tag include "NAME" and "TARGET". Capitalization is not important.
- <A HREF="mailto:me@my.host"> send me email</A>
- mailto: tells the browser to send an email.
- <A HREF="mailto:me@my.host
?"> send me email</A> - the question mark, ? tells the email client to look for a variable in addition to the email address.
- <A HREF="mailto:me@my.host
?subject=hello"> send me email</A> - subject= tells the email client to fill the subject line with whatever subject is equal to.
- <A HREF="mailto:me@my.host
?subject=hello &"> send me email</A> - the ampersand, & tells the email client to look for additional variables. So ? goes before the first variable, and & goes before each of the remaining variables.
- <A HREF="mailto:me@my.host
?subject=hello &cc=myfriend@my.host &body=this_is_the_body"> send me email</A> - you can preload other email fields as well.
Try the following:
<A HREF="mailto:me@my.host ?subject=hello &body=this_is_the_body &cc=carbon_copy">click me</A>
click me
Spaces in the values will confuse the email client, so you can use underscores as above, or you can use the 'escape sequence', %20 to encode spaces.
Try the following:
<A HREF="mailto:me@my.host ?subject=hello &body=this%20is%20the%20body &cc=carbon%20copy"> click me</A>
click me
New on the Java Boutique:
New Review:
Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling
API boasts simplicity, ease-of-integration, a well-rounded feature
set, and it's free!
New Applet:
Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA
sequences into three useful formats.
Elsewhere on internet.com:
WebDeveloper Java
Lots of Java information on webdeveloper.com
WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.
ScriptSearch Java
Hundreds of free Java code files to download.
jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.
New on the Java Boutique:
New Review:
Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling
API boasts simplicity, ease-of-integration, a well-rounded feature
set, and it's free!
New Applet:
Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA
sequences into three useful formats.
Elsewhere on internet.com:
WebDeveloper Java
Lots of Java information on webdeveloper.com
WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.
ScriptSearch Java
Hundreds of free Java code files to download.
jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.
|