![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() |

|
| Server Side Languages Error ! Post here with questions about PHP, perl/cgi, ASP, etc. |
![]() |
|
In mailto: how can I use the & character in the body?
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Administrator
Posts: 876
Join Date: Oct 2005
Rep Power: 10
IM:
|
I'm experiencing problems if the body contains the & character. for example if I type: mailto:myname@mydomain.com?subject=Test& I get the following body: http: I also tried typing mailto:myname@mydomain.com?subject=Test& but I'm always getting the same wrong result. (The body is truncated as I get to the & symbol). I've tried this with Eudora. Any suggestion on how to fix this? Solution: You are going to have problems with this and it probably won't work. The ampersand (&) is a special character in the URL. You can use the ascii code for it but the mail client will probably not translate it for you. The body won't be html so & won't work either. Are you really sure that you want to use mailto? I would recommend avoiding it at all costs. It is poorly supported by mail clients and works with few online email accounts. It will also expose the email and other personal info to bots, etc that can get it from your HTML. Finally, it requires the visitor to use their email program and account when they may not want to. If your server supports a server language then you can easily develop a better option with it to send the email. This is a much better option. Let me know if you want more info on it or have questions. The server solution will fix this problem since the server can write the message body with the ampersand. Let me know if you have any questions or need more information. also The options you tried would be the ones that have a chance of working. If you want you could try another email program. Some of the recent versions have dropped support for mailto completely and many had only limited support for the body. If the mail program doesn't matter then you may find one that will work. The & sign should not ever work but you may be able to use the ascii code. Are you trying to send a bulk email or why do you need it automated? I ask to see if I can suggest a better option than Direct Access and mailto. |
|
|
|
|
|
|
|
|
#2 (permalink) |
|
Administrator
Posts: 876
Join Date: Oct 2005
Rep Power: 10
IM:
|
www. |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|