passing content-type in mailto: link?

Discussion in 'Javascript' started by Sam, Jan 24, 2004.

  1. Sam

    Sam Guest

    Does anybody know the proper format to pass content-type in a mailto: Link?

    Here is what I have. I doesn't work if I escape() the whole body either.


    var z = new String("mailto:");
    if('w' == move) {
    z += escape(wh) + "?to=" + escape(wh);
    } else {
    z += escape(bl) +"?to=" + escape(bl) ;
    }
    z += "&subject=email chess&body=" +
    "Content-type: text/html; charset=\"US-ASCII\" " + /*does not work!*/
    "Content-transfer-encoding: quoted-printable " + escape(
    "<html><a href='" +
    theurl() +
    "?d=" + rlc(board) +
    "&w=" + wh +
    "&b=" + bl + "&m=" + move +
    "'>Please click here</a></html>") ;
    location.replace(z);
    Sam, Jan 24, 2004
    #1
    1. Advertising

  2. Sam wrote:
    > Does anybody know the proper format to pass content-type in a mailto:
    > Link?
    >


    You can't send headers with client-side JavaScript and the usage of the
    mailto: pseudo-protocol is a very bad idea (Google for related NG threads
    for info).

    Solution: use a server side script instead, or look for an online service
    which provides you with one.


    JW
    Janwillem Borleffs, Jan 24, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?c2NrMTA=?=

    MailTo Link in GridView

    =?Utf-8?B?c2NrMTA=?=, Oct 7, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    10,209
    crjangel
    Oct 18, 2007
  2. mscir
    Replies:
    0
    Views:
    647
    mscir
    Apr 26, 2006
  3. Neal
    Replies:
    27
    Views:
    1,596
    Dave Patton
    Sep 23, 2004
  4. Stanimir Stamenkov
    Replies:
    2
    Views:
    741
    Stanimir Stamenkov
    Oct 25, 2005
  5. Thomas Gagne
    Replies:
    2
    Views:
    319
    Robert Klemme
    Mar 15, 2013
Loading...

Share This Page