Announcement

Collapse
No announcement yet.

Mailto link generator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Mailto link generator

    hi i just foudn this little gem

    helps generate code for any mailto links you need including

    bcc cc body etc

    http://www.cmg02.com/cg2/mailto.htm

    have fun now to implement the var to eliminate the bots
    Remembering the road to Actinic enlightenment is a long and sometimes painful one.
    Current project:
    cheapadulttoys4u.co.uk
    cheaplingerie4u.co.uk
    Something for the Missus,Something for the Weekend

    #2
    I'm afraid that it generates a plain text mailto: type link that will easily be picked up by spambots.

    Also the generator above produces broken code if you have any & characters in your parameters.

    It would be a good idea to hide your e-mail address on your web pages. Either use a contact us form or use JavaScript to obfuscate the e-mail address. I.e. Instead of:-

    <a href="mailto:myname@mydomain.com">Email us</a>

    use instead:-

    <script language=JavaScript>
    <!--
    document.write('<a hr' + 'ef="mai'
    + 'lto:'
    + 'myname@'
    + 'mydomain'
    + '.com">Email us</a>');
    // -->
    </script>
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      thanks norman i did say i needed to tweak it to include protection ill try your way now
      ive been trying to implment the AUG version

      ive been working on this all day if you read my other posts i can include the spambots protection and fill in the subject line or the body but some how i cant merge the two


      http://community.actinic.com/showthread.php?t=28965
      Remembering the road to Actinic enlightenment is a long and sometimes painful one.
      Current project:
      cheapadulttoys4u.co.uk
      cheaplingerie4u.co.uk
      Something for the Missus,Something for the Weekend

      Comment


        #4
        Originally posted by NormanRouxel
        <script language=JavaScript>
        <!--
        document.write('<a href="mai'
        + 'lto:'
        + 'myname@'
        + 'mydomain'
        + '.com">Email us</a>');
        // -->
        </script>
        I tried this in a normal html page generated in Dreamweaver & Works fine...

        However the identical code in the contact us page in Actinic doesn't work - I added a small table below the </form> tag to contain the 'alternative' contact methods and added the above code - all it gave was a '404 error Page not Found' !!!

        Investigating, I discovered that Actinic was adding the absolute web address to the beginning of the compiled string...

        Digging further, I discovered that it worked fine if the word/command 'mailto' was not split...

        FYI
        Last edited by Donald Gray; 06-May-2007, 04:50 PM. Reason: spullig mistook
        www.yandles.co.uk
        www.websilk.co.uk
        Today is the tomorrow that I worried about yesterday.
        So far, all is well. Am I still worried? YES! Watch some b.....d mess it up!

        Comment


          #5
          Actinic is probably seeing the href="... bit


          So changing to

          document.write('<a hr' + 'ef="mai'

          would probably fix things generally.

          If you've time to check this please let me know and I'll amend the original post.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            I did mess with it an got it working, however I opted for a minor vaiation of the AUG one:


            <img src="envelope11x11.gif" />
            <script type=text/javascript>
            var _u = "sales";
            var _d = "domain.co.uk?subject=Website enquiry...&body=";
            var _l = _u + "@" + _d;
            var _m = "<img src='envelope11x11.gif'/>";
            document.write("<a href='mailto:"+_l+"'> Email us.</a>");
            </script>

            The 'envelope11x11.gif is a small envelope graphic - you can 'borrow' it from our Yandles Contact Us page...
            www.yandles.co.uk
            www.websilk.co.uk
            Today is the tomorrow that I worried about yesterday.
            So far, all is well. Am I still worried? YES! Watch some b.....d mess it up!

            Comment


              #7
              Why not do it like this
              Code:
              <script type=text/javascript>
              var _u = "sales";
              var _d = "domain.co.uk?subject=Website enquiry...&body=";
              var _l = _u + "@" + _d;
              var _m = "<img src='envelope11x11.gif'/>";
              document.write("<a href='mailto:"+_l+"'>");
              </script>
              <img border=0 src="envelope11x11.gif" />Email us...</a>
              So that the last line is plain HTML and is easier to alter without javaScript tinkering.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Originally posted by NormanRouxel
                Why not do it like this
                Code:
                <script type=text/javascript>
                var _u = "sales";
                var _d = "domain.co.uk?subject=Website enquiry...&body=";
                var _l = _u + "@" + _d;
                var _m = "<img src='envelope11x11.gif'/>";
                document.write("<a href='mailto:"+_l+"'>");
                </script>
                <img border=0 src="envelope11x11.gif" />Email us...</a>
                So that the last line is plain HTML and is easier to alter without javaScript tinkering.
                Thanks Norman

                'cos mine now works... I've moved on to tinkering with something else (See what else I can break! )
                www.yandles.co.uk
                www.websilk.co.uk
                Today is the tomorrow that I worried about yesterday.
                So far, all is well. Am I still worried? YES! Watch some b.....d mess it up!

                Comment


                  #9
                  Originally posted by NormanRouxel
                  Actinic is probably seeing the href="... bit


                  So changing to

                  document.write('<a hr' + 'ef="mai'

                  would probably fix things generally.

                  If you've time to check this please let me know and I'll amend the original post.

                  ok...this is an old thread, I know..but I was linked directly to the original code post only from THIS THREAD and had the same problem implementing it.
                  It DOES need the adjustment made above...if there's any chance of editting the original post then anyone else being directed from the thread I came from will get working code straight away

                  Cheers
                  Tracey

                  Comment


                    #10
                    Hi, Tracy

                    I followed your THIS THREAD link which took me back to post #2 in this thread! Anyway, I've gone and updated #2 as required.
                    Norman - www.drillpine.biz
                    Edinburgh, U K / Bitez, Turkey

                    Comment


                      #11
                      Originally posted by NormanRouxel
                      Hi, Tracy

                      I followed your THIS THREAD link which took me back to post #2 in this thread! Anyway, I've gone and updated #2 as required.
                      that's what I meant..but as the link in that thread only showed post #2, it meant that it directed to code that didn't completely work as it was, IYSWIM

                      It didn't display the whole thread which would have shown that an edit was needed. Hence my post

                      Thanks, Norman
                      Tracey

                      Comment

                      Working...
                      X