Mailto lacks Newline in Message

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jrsjrs
    New Member
    • Sep 2006
    • 24

    Mailto lacks Newline in Message

    What should I do to get my 3 messages - content1, content2, content3 -
    to print on three separate lines in the body of the email?
    In other words, what do I use to get a newline between these lines?
    Neither <BR> nor %OA nor \n appear to work. Why not?
    Any suggestions, or is this simply impossible?

    <script language="JavaS cript">
    var address = new Array()
    var name = new Array()
    var i=0
    var subj
    var content
    var content2
    var content3
    var total=3
    subj = "This goes into the Subject Line. ";
    content1 = "This is the FIRST LINE in the Message Section";
    content2 = "This should be the SECOND LINE in Message Section.";
    content3 = "This should be the THIRD LINE in Message Section.";
    name[0] = "The SENDER";
    address[0] = "eee@ffff.c om";
    name[1] = "RECIPIENT 1";
    address[1] = "ggg@dddd.c om";
    name[2] = "RECIPIENT 2";
    address[2] = "www@hhhh.c om";
    name[3] = "RECIPIENT 3";
    address[3] = "kkk@mmmm.c om";
    for (i=0;i<=total;i ++)
    {
    document.write( i +') <a href=\"mailto:' + address[i] + '?subject=' + subj +'&bcc=' + address[0] +'&body=' + content1 + content2 + content3 +'\">');
    document.write( name[i] + " --- " + address[i] + '</a><BR>');
    }
    </script>
  • improvcornartist
    Recognized Expert Contributor
    • May 2007
    • 303

    #2
    It looks like you use %OA. Try %0A (with a zero). This works for me in mailto links.

    Comment

    • jrsjrs
      New Member
      • Sep 2006
      • 24

      #3
      Originally posted by improvcornartis t
      It looks like you use %OA. Try %0A (with a zero). This works for me in mailto links.
      Thanks Improvcornartis t !
      You were right. I needed a number zero instead of a letter O.
      After working with it for awhile I found that %0D%0A worked best.

      Thanks again.

      Comment

      Working...