javascript email

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Junior

    javascript email

    Using this syntax:
    MailTo with multiline message in Body

    <a href="mailto:as tark1@unl.edu?b ody=The message's first
    paragraph.%0A%0 aSecond paragraph.%0A%0 AThird Paragraph.">

    Works fine, except cursor sets at end of "To:" addressee and not in body of
    email. If you start typing you are not in the body of the email but in the
    addressee line and it gets messed up. Anyway to have cursor set in body of
    email?

    Thanks for any help.

    Junior


  • Evertjan.

    #2
    Re: javascript email

    Junior wrote on 29 jan 2008 in comp.lang.javas cript:
    Using this syntax:
    MailTo with multiline message in Body
    >
    <a href="mailto:as tark1@unl.edu?b ody=The message's first
    paragraph.%0A%0 aSecond paragraph.%0A%0 AThird Paragraph.">
    >
    Works fine, except cursor sets at end of "To:" addressee and not in
    body of email. If you start typing you are not in the body of the
    email but in the addressee line and it gets messed up. Anyway to have
    cursor set in body of email?
    Wrong NG.

    This has nothing to do with Javascript.

    It depends on the email programme you use.
    Anyway to have cursor set in body of email?
    Anyway? Any way?

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    • Bart Van der Donck

      #3
      Re: javascript email

      Junior wrote:
      <a href="mailto:as ta...@unl.edu?b ody=The message's first
      paragraph.%0A%0 aSecond paragraph.%0A%0 AThird Paragraph.">
      >
      Works fine, except cursor sets at end of "To:" addressee and not in body of
      email. If you start typing you are not in the body of the email but in the
      addressee line and it gets messed up. Anyway to have cursor set in body of
      email?
      It is a setting of the email client of the machine - I don't believe
      it's possible to modify it.

      But there is another problem with your code.

      http://rfc.net/rfc2368.html (RFC2368) says:

      | note that line breaks in the body of
      | a message MUST be encoded with "%0D%0A".

      where MUST means [Cit. RFC2119] "an absolute requirement".

      So:

      <a href="mailto:as ta.@unl.edu?bod y=The message's first
      paragraph.%0D%0 A%0D%0ASecond paragraph.%0D%0 A%0D%0AThird
      Paragraph.">

      Hope this helps,

      --
      Bart

      Comment

      Working...