PDA

View Full Version : mailto: protocol



habeebuddin
08-07-2007, 07:20 AM
Hi,

Can we put HTML tags inside the mailto: string? I want to put an hidden field inside the mailto: string. I tried the follwing example.

<a href="mailto:user@host.name?subject=hi&body=hi%2C%3Cinput%20type%3Dhidden%20value%3Dhabeeb%20id%3Dk%3E">e-Mail</a>

but it is showing the tag in the mail message. I want it to be hidden.
Can anyone tell me how to solve this problem.

Regards,
Habeeb.

jscheuer1
08-07-2007, 07:50 AM
I think you would need to use a server side mail program and a form that can set the the content as HTML. Otherwise it will most likely be sent as text.

habeebuddin
08-07-2007, 08:30 AM
Thanks for the response.

Can u explain more clearly...

jscheuer1
08-07-2007, 09:22 AM
It really depends upon what you have available to you vis a vis your server. I believe that you can also use a third party server for this. I know you can for just regular email. So, it is likely that you could do it for HTML formatted email as well. The two most popular server side languages are asp and PHP.

http://www.google.com/search?hl=en&lr=&client=opera&rls=en&hs=4u8&q=asp+send+formatted+email&btnG=Search

http://www.google.com/search?hl=en&lr=&client=opera&rls=en&q=PHP+send+HTML+formatted+email&btnG=Search

And there is a program named formmail available on many hosts.

http://www.google.com/search?hl=en&client=opera&rls=en&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=formmail+send+HTML+formatted+email&spell=1

habeebuddin
08-07-2007, 12:48 PM
Hi,
I think u did not understood my problem. I am sending an e-mail message to the user. This e-mail message contains a hyperlink(<a href=mailto:...>). When clicked, it creates a new mail message, with some data. This data contains some Id also. But I don't want the user to view this Id. So I tried putting this id in the hidden field, by using <input type='hidden' ...>. But even if we put the Id in hidden field, it is visible(Entire hidden field HTML element is visible) in the new mail message.

djr33
08-07-2007, 02:05 PM
I think it's just something like:
mailto:addr@your.com&subject=hello&body=some&#37;20text%20here

Twey
08-07-2007, 02:24 PM
As djr33 said, there's no way to specify that it is text/html from a link.

jscheuer1
08-07-2007, 02:48 PM
I think it's just something like:
mailto:addr@your.com&subject=hello&body=some%20text%20here


As djr33 said, there's no way to specify that it is text/html from a link.

He really said that? You are so intuitive, Twey. In any case, there is no way to do it unless you go to the server side. Once you go that route, there are different ways of going about it depending upon what is available to you on your server. Your host (if they have anything that can do this, and good online or other help available on it) would be your best source of information. Failing that, the search links I posted previously in this thread will point you in the right direction once you decide which general method to use. Third party server utilities (if you go that route) may also have help on this topic.

The bottom line is, that unlike in javascript where usually a single line of code or one branching statement will do a thing like this, since it cannot be done in javascript, you must find an alternative that suits your situation.

Twey
08-07-2007, 03:23 PM
He really said that? You are so intuitive, Twey.Oh -- it appears I was thinking of a different thread :-\