email code

email code

Posted by: coleism
Posted on: 2005-01-18 16:08:00

Does anyone know any specific code for adding a link to my page that takes the clicker to their default email program and automaticly adds in my email adress and/or other information? I need this code.

Re: email code

Posted by: user919
Posted on: 2005-01-18 16:19:00

<a href="mailto:user@domain.com?subject=this is the subject">Email Me</a>

This is food for spambots though

jason

Re: email code

Posted by: Atropos7
Posted on: 2005-01-18 16:21:00

It's called the mailto: scheme and it is not guaranteed to work, because it depends on whether or not the browser is able to pass the URL to the mail client in full as well as the mail client being able to decode it. There is an RFC: http://www.faqs.org/rfcs/rfc2368.html




cool Perl / MySQL / HTML+CSS

Re: email code

Posted by: Logical Program
Posted on: 2005-01-18 16:23:00

Hey, there's a fairly simple MAILTO: HTML hyperlink reference that can do this... I've posted the code below, remember to change the information to what you want it to be...

<a href="mailto:YourEmailHere?subject="YourSujectHere"&body="YourBodyTextHere"">

That's pretty much it, you can mail to more than one address by adding a comma after the first email and tpying another. You may want to check the way the quotes are set up, I didn't test it out.

Re: email code

Posted by: coleism
Posted on: 2005-01-18 16:27:00

Thanks so much. Ill try them all.

Re: email code

Posted by: dtobias
Posted on: 2005-01-20 06:58:00

Except that spaces are invalid in URLs unless encoded as , and ampersands within HTML documents need to be represented by &, so you really need to do:

<a href="mailto:user@example.net?subject=Test%20Subject&amp;body=Test%20Body">


-- DanEdited by dtobias on 01/20/05 06:59 AM (server time).

Tags: email programemail adressaddsdefault