PDA

View Full Version : mailto



ahs10
06-06-2008, 03:21 PM
how can i put a link, like <a href="whatever.com">link</a> in the the body of the email that is generated below?

location='mailto:user@domain.com?body='+escape('Greetings!\n\nThis is an email generated by JavaScript that I would like to put a link into.\nThanks for your help!\n\nSincerely,\n\nahs10');

boogyman
06-06-2008, 05:48 PM
once you are getting more complex... such as this, you should think about using a template rather than try to pass all this information into the url

ahs10
06-06-2008, 10:41 PM
ok. so what do you mean use a template?

previously i've used php send mail. specifying headers for content much more complex than a link and sending it. the problem with that method here is that i need the user to have a copy of it in the sent folder of their mail client.

the example i gave above is in my js as the final step of an ajax request, after the response is received. would your solution of "using a template" be done server side before the ajax response is received? or client-side, after the response is sent back?

any elaboration you could provide would be very helpful. thanks for your time!