Skip to main content
Known Participant
November 8, 2010
Answered

Problem with email links

  • November 8, 2010
  • 1 reply
  • 3481 views

Hi all -

I am using RoboHelp v7. I inherited my KB's already set up, but have been maintaining them for a couple of years now. However, we moved from Outlook to Google mail, and users are no longer able to send email from Robo. Note that I am able to send email from any other webpage using my corporate gmail account, having set up my mailto to utilize gmail.

I have email addresses in my KB's in two formats, and tried a third based on a post I read.

  1. A regular mail to - where I've simply created a link to an email address, such as - "please contact the ECCN Reviewers via email to Eccn   PCM-PCMECCN."
    with the link set as - mailto:XXXXXXX@motorola.com
  2. A script that was created by the original owner, which contains one line - this always worked previously
    document.write("<a href=\"mailto:infomoto@motorola.com?subject=" + "Change request for '"+ document.title + "' page of the MotoPDM Help System\">MotoPDM Help Admin</a>");
  3. I read Peter's Snippet #38 - Email this topic - and created a new snippet based on what he had - this didn't work either
    <p><script type="text/javascript">
    var mailSubject = 'Useful Information';
    var mailBody    = 'This page might help: ' + location.href;
    var mailDisplay = 'Click here for a demo.';
    document.write(
        '<a href="mailto:infomoto@motorola.com'
        + '?subject=' + escape(mailSubject)
        + '&body=' + escape(mailBody)
        + '">' + mailDisplay + '</a>'
        );</script></p>

In all three examples above, when I click on an email link, the main page of the KB goes blank, and nothing happens.

If I click on a normal webpage link (such as http://www.swingandblues.com/about.html, Greg Avakian - "swingdj@gmail.com", I generate an email without issue.

I'd appreciate any assistance, I have no idea where to go next.

Thank you,

Anahid Avakian

    This topic has been closed for replies.
    Correct answer Willam van Weelden

    Hi William -

    Sorry for delay - we are working on a release and that took precedence over everything else for a few days... first - thank you for all your assistance. I do have an issue, but I'm sure it's me doing something wrong. I'm getting a run time error...

    This is my original script:

    document.write("<a href=\"mailto:infomoto.help@gmail.com?subject=" + document.title + " section of the PDM1 KB\">infomoto.help@gmail.com</a>");

    So I replace it with your Java Script, and yes - I still have the red box in the WYSIWYG page
    +d++ocument.write('<a href="javascript:void(0);" onclick="Mailto(\''+document.title+'\')" >youremail</a>');+

    The HTML looks like this:
    Problem with this page? Click here: <script>+d++ocument.write('<a href="javascript:void(0);" onclick="Mailto(\''+document.title+'\')" >@infomoto.help@gmail.com</a>');+</script>
    to provide feedback</p>

    When I preview it, I get this error:
    A Runtime Error has occurred. Do you wish to Debug?
    Line 33 Error: Expected ';'

    If I publish, I just get a plus sign for the email -

    Then, if I add the additional info in the HTML page just before script, I get this error when previewing (after saving) - Line 35 Error: Syntax Error and Line 40 Error: Syntax Error:

    Problem with this page? Click here:
    +<script type="text/javascript">+
    +function Mailto(subject) {+
    +     var HTML = 'mailto:mailto:infomoto.help@gmail.com?subject='+subject+'+ section of the PDM1 KB';
    +window.open(HTML,'Email');+
    +}
    +
    +</script>+
    <script>+d++ocument.write('<a href="javascript:void(0);" onclick="Mailto(\''+document.title+'\')" >@infomoto.help@gmail.com</a>');+</script>
    to provide feedback</p>

    My WYSIWYG page does have two red boxes, but they both have plus signs in front of them (which is different than it was with my original script). And if I publish, I just get two plusses:

    Any suggestion?

    Thank you,

    Anahid


    Hi,

    Your code is hard to read because of the forum markup. Please post a screenshot of the code if the following doesn't help.

    In your new code you have "d++ocument.write". Remove the two +, so it reads: "document.write".

    Greet,

    Willam

    1 reply

    AnahidMAAuthor
    Known Participant
    November 9, 2010

    Some additional information - did some more testing. If the page uses the contents, as this one does, the email does not work. Again, it did with Outlook, but it does not when the user uses google mail as their email client. Desperately hoping someone has a solution...

    However, if I were to open this in it's own window, without the contents frame, the email works perfectly, and launches a gmail window -

    Willam van Weelden
    Inspiring
    November 9, 2010

    Hi,

    Google "Gmail mailto:". It seems this is some problem. See also: http://mail.google.com/support/bin/answer.py?hl=en&answer=10966

    The links you provide look like normal mailto links. As I see it, any problems are to be blamed on GMail. As far as I can find, it looks like you have to setup your browser to make the links work.

    As a workaround, try creating a popup to launch the link. For instance, call the following function:

    function mailto() {
        var HTML = 'mailto:test@test.com';
        window.open(HTML,'Email');
    }

    Greet,

    Willam

    AnahidMAAuthor
    Known Participant
    November 9, 2010

    Hi William -

    Thanks much for the response. Yes - I have set up gmail as my default for email, the only time it's a problem is when the email address is in a page where I have the contents frame.

    I understand the concept of what you are saying about the pop-up email - and logically it sounds like it should work. But here is where my ignorance shows - this is what I currently have for the email, so that it will display the proper subject and report the page the mail is being sent from - it works perfectly (if not in a frame, of course!).

    document.write("<a href=\"mailto:infomoto.help@gmail.com?subject=" + document.title + " section of the PDM1 KB\">infomoto@motorola.com</a>");

    How would I incorporate your function?

    Many thanks...

    Anahid

    PS - your gmail solution is much easier than mine, I will pass that onto my co-workers who are just migrating now - thank you!